================
@@ -140,3 +140,39 @@ void test5() {
FOO1 + 1; // expected-error {{'FOO1' is defined as a function-like macro;
did you mean 'FOO1(...)'?}}
bar(FOO1); // expected-error {{'FOO1' is defined as a function-like macro;
did you mean 'FOO1(...)'?}}
}
+
+#undef FOO1
+
+void test6(){
+ int iter = FOO1; //expected-error {{use of undeclared identifier 'FOO1'}}
+}
+
+
+#define FOO1() 99 // expected-note {{'FOO1' defined here as a function-like
macro}}
+// expected-note@-1 {{'FOO1' defined here as a function-like macro}}
----------------
AaronBallman wrote:
```suggestion
#define FOO1() 99 // expected-note 2 {{'FOO1' defined here as a function-like
macro}}
```
https://github.com/llvm/llvm-project/pull/223895
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits