Skip to content

Commit

Permalink
Add diagnostic for passing pointer-reference from js to wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
DutChen18 authored and yuri91 committed Sep 9, 2024
1 parent 8ae9575 commit 59309ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21172,7 +21172,7 @@ void Sema::CheckCheerpFFICall(const FunctionDecl* Parent, const FunctionDecl* FD
d << "variadic";

d << "pointer";
} else if (pt && pt->isReferenceType() && pt->getPointeeType()->isFundamentalType()) {
} else if (pt && pt->isReferenceType() && (pt->getPointeeType()->isFundamentalType() || pt->getPointeeType()->isPointerType())) {
Diag((*a)->getBeginLoc(), diag::err_cheerp_wrong_basic_pointer_param)
<< FDecl << FDecl->getAttr<AsmJSAttr>()
<< Parent << Parent->getAttr<GenericJSAttr>()
Expand Down

0 comments on commit 59309ae

Please sign in to comment.