[PATCH] D107141: [Inline-asm] Add diagnosts for unsupported inline assembly arguments

Jennifer Yu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 10 15:31:17 PST 2022


jyu2 added inline comments.


================
Comment at: clang/lib/Sema/SemaStmtAsm.cpp:622
+    if (InTy->isIntegerType() || InTy->isPointerType() ||
+        InTy->isStructureType() || InTy->isConstantArrayType())
       InputDomain = AD_Int;
----------------
Are you sure you want to change the Input/output Domain?  Since you changed this, could you add both codegen and sema check tests for  struct type(you already has sema check for struct type, but I don't see any array type) and array type.  

Thanks.
Jennifer


================
Comment at: clang/lib/Sema/SemaStmtAsm.cpp:677
+          Context.getIntTypeForBitwidth(OutSize, /*Signed*/ false).isNull())
+        targetDiag(OutputExpr->getExprLoc(), diag::err_store_value_to_reg);
+
----------------
Do you need return NS after diagnostic?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107141/new/

https://reviews.llvm.org/D107141



More information about the cfe-commits mailing list