================
@@ -3369,6 +3369,23 @@ static void handleSectionAttr(Sema &S, Decl *D, const 
ParsedAttr &AL) {
   }
 }
 
+static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+  StringRef Model;
+  SourceLocation LiteralLoc;
+  // Check that it is a string.
+  if (!S.checkStringLiteralArgumentAttr(AL, 0, Model, &LiteralLoc))
----------------
heiher wrote:

Thank you. I can't reproduce it.

```
t.c:2:29: error: expected string literal as argument of 'model' attribute
    2 | static __attribute__((model(5))) int pcpu;
      |                             ^
1 error generated.
```

```
t.c:2:29: error: code_model must be "tiny", "small", "kernel", "medium" or 
"large"
    2 | static __attribute__((model("5"))) int pcpu;
      |                             ^
1 error generated.
```

https://github.com/llvm/llvm-project/pull/72078
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to