StarOne01 wrote:

Apologies for letting this go quiet for so long, @AaronBallman. Picked this 
back up and rebased onto current `main`.

The current implementation doesn't depend on `*Out`'s state anymore, the macro 
check was pulled into a standalone `isFunctionLikeMacro()` helper, called 
unconditionally after `R.clear()` at the end of `DiagnoseEmptyLookup` 
regardless of whether typo correction fired. `test5` in `typo-correction.c` 
covers the `F + 1;` vs `g(F)` discrepancy directly, and both now produce the 
same diagnostic.

Ran the full Sema test suite after rebasing. One incidental find: 
`c23-varargs.c` needed updated expectations, since `va_start` (a builtin 
function-like macro) now correctly triggers this diagnostic instead of the old 
undeclared-identifier error when used without parens pre-C23. Updated that test 
to match. Everything else passes clean (1155/1155 supported tests).

Happy to make further changes if there's still concern about the approach.

https://github.com/llvm/llvm-project/pull/123495
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to