[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 21 06:03:59 PST 2025


https://github.com/Sirraide commented:

The tests are in the wrong directory (you’ve added them to a file in `test/Preprocessor`, but this is a Sema change so the test should probably be in `test/Sema`).

Additionally, a test involving typo correction would probably be a good idea:
```c
#define FOO1() 
void f() {
    int FOO;
    int x = FOO1; // Typo correction to 'FOO' instead of note about 'FOO1()'.
}
```

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


More information about the cfe-commits mailing list