Just a small improvement.
Before:
array.cpp:1279:9: error: use of undeclared identifier 'foo' 1279 | int a = foo(); | ^ array.cpp:1280:9: error: use of undeclared identifier 'foo' 1280 | int b = foo; | ^ 2 errors generated.
After:
array.cpp:1279:9: error: use of undeclared identifier 'foo' 1279 | int a = foo(); | ^~~ array.cpp:1280:9: error: use of undeclared identifier 'foo' 1280 | int b = foo; | ^~~ 2 errors generated.
I'm not passing the TypoRange here now, which regresses the test case I posted. Apparently the handling of -fmacro-backtrace-limit depends on the range passed here? That seems weird.