[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 20 05:37:52 PST 2025
================
@@ -5936,6 +5936,8 @@ def err_fold_expression_limit_exceeded: Error<
"instantiating fold expression with %0 arguments exceeded expression nesting "
"limit of %1">, DefaultFatal, NoSFINAE;
+def note_function_like_macro_requires_parens
+ : Note<"'%0' is defined here as a function-like macro; did you mean to write '%0(...)'">;
----------------
Fznamznon wrote:
Not sure, but "did you mean" without any additional verb feels a bit more aligned with other messages clang can emit
```suggestion
: Note<"'%0' is defined here as a function-like macro; did you mean '%0(...)'">;
```
https://github.com/llvm/llvm-project/pull/123495
More information about the cfe-commits
mailing list