[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:51 PST 2025
================
@@ -2509,6 +2509,20 @@ bool Sema::DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R,
DC = DC->getLookupParent();
}
+ // Check whether a similar function-like macro exists and suggest it
----------------
Fznamznon wrote:
> I did try it, but in this case the function returns here itself
I'm not sure I understand what it is the problem with this return? It should happen when a typo replacement has been found, which seems not the case for the originally reported case, see https://godbolt.org/z/br9n6eGsT .
Could you please elaborate a bit more?
Because that
> Instead of doing this here before typo correction, the note that this pr adds should probably just be emitted right after the error we emit at the very end of this function
Does seem like a correct soluion.
https://github.com/llvm/llvm-project/pull/123495
More information about the cfe-commits
mailing list