feature / #77 show warnings for included header files along with source files#84
Conversation
… to clear them from diagnostics
danmar
left a comment
There was a problem hiding this comment.
will it show all the warnings in the header file? or only multi-location warnings that points at the source file primarily?
I wonder what we will do if the user wants to switch to the header file and fix a warning. We need to be able to analyze the header file then..
can you remember that "warnings in header X was generated when source file Y" was scanned? And then when header file X is saved then you run the analysis on file Y?
|
I updated the solution somewhat, rather than mapping just header files relation to source files we map all files agnostically if they get warnings generated for them from analysis of any file (even themselves). This makes it so that: I analyze source file main.c which implements header.h I analyze header file header.h I close source file main.c -> this does not clear diagnostics for header.h because it has warnings generated from analyzing it itself. If however all warnings for header.h are generated when analyzing main.c we will clear diagnostics for header.h when main.c is closed. |
|
does this fix mean that we have the #9 bug again? |
no, it will point to the correct file |

To not clutter the problems tab with header file errors we need a fairly intricate solution to keep track of where header file errors are coming from (so we can clear diagnostics for a header file when the source file whose analysis generated them are closed).
This solution supports stack traces with locations in multiple different files
Previous bug where problems for a given file would not get cleared when it's tab is closed is also fixed