Diagnostics calculated from include
d files report them for the wrong file
#14968
Labels
A-diagnostics
diagnostics / error reporting
Broken Window
Bugs / technical debt to be addressed immediately
C-bug
Category: bug
I-panic
Our diagnostics infra was written with the idea in mind that dianostics reported from macro expansions will only end up in the calling file and as such we never verify that the upmapped ranges belong to the file we calculate the diagnostics for. This assumption is incorrect,
include!
calls in fact have two macro inputs from differing files, as such, any diagnostic calculated from an included file right now will either report the diagnostic in some random location in the calling file or worse crash the server.An example crash test case for
unresolved_macro_call
diagnostic:The text was updated successfully, but these errors were encountered: