[PATCH] D135500: [Clang] reject bit-fields as instruction operands in Microsoft style inline asm blocks.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 10 07:16:52 PDT 2022
erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.
1 nit, otherwise LGTM.
================
Comment at: clang/lib/Sema/SemaStmtAsm.cpp:937
for (uint64_t I = 0; I < NumOutputs + NumInputs; ++I) {
- if (Exprs[I]->getType()->isBitIntType())
- return StmtError(
- Diag(Exprs[I]->getBeginLoc(), diag::err_asm_invalid_type)
+ if (Exprs[I]->getType()->isBitIntType()) {
+ InvalidOperand = true;
----------------
There is enough repetition of Exprs[I] I suspect there is value to splitting them up as:
`Expr *CurExpr = Exprs[I];`
for readability purposes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135500/new/
https://reviews.llvm.org/D135500
More information about the cfe-commits
mailing list