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

Phoebe Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 9 22:18:32 PST 2022


pengfei added inline comments.


================
Comment at: clang/lib/Sema/SemaStmtAsm.cpp:679
+          !llvm::isPowerOf2_32(OutSize))
+        targetDiag(OutputExpr->getExprLoc(), diag::err_store_value_to_reg);
+
----------------
jyu2 wrote:
> Error message is not very clear to me.  I think we should create more specified error message there.  Like power of two, or size <  8 or > pointer size?
> 
> Using error message selector.
Use `getIntTypeForBitwidth` instead. So we don't need to check for each case.


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