[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 10 09:48:03 PST 2025
================
@@ -2382,8 +2403,11 @@ static void emitEmptyLookupTypoDiagnostic(
if (Ctx)
SemaRef.Diag(TypoLoc, diag::err_no_member) << Typo << Ctx
<< SS.getRange();
- else
+ else {
+ if (isFunctionLikeMacro(Typo, SemaRef, TypoLoc))
+ return;
----------------
AaronBallman wrote:
```suggestion
else if (diagnoseFunctionLikeMacro(SemaRef, Typo, TypoLoc))
return;
else
```
https://github.com/llvm/llvm-project/pull/123495
More information about the cfe-commits
mailing list