[clang] [Clang] Constant Expressions inside of GCC' asm strings (PR #131003)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 17 07:13:03 PDT 2025


================
@@ -3302,21 +3302,20 @@ class GCCAsmStmt : public AsmStmt {
   friend class ASTStmtReader;
 
   SourceLocation RParenLoc;
-  StringLiteral *AsmStr;
+  Expr *AsmStr;
 
   // FIXME: If we wanted to, we could allocate all of these in one big array.
-  StringLiteral **Constraints = nullptr;
-  StringLiteral **Clobbers = nullptr;
+  Expr **Constraints = nullptr;
----------------
erichkeane wrote:

Another suggestion to add to the `lets make these sane` bug report, we could probably use `ArrayRef` for these to make the pointer-pointer less difficult to use.

https://github.com/llvm/llvm-project/pull/131003


More information about the cfe-commits mailing list