[analyzer] template instantiations, multiple reports

Hi,

does the analyzer always produce multiple reports
if the detected error is in a template that gets instantiated
in multiple translation units or is the check itself
then doing something wrong if bugs get reported more than once?

-Alex

The analyzer does not do any cross-translation unit uniquing. So if an error is detected in the same header in multiple translation units it will get reported multiple times. Also, if the analyzer notices that the last component of path diagnostic is in a header, it will try to report the diagnostic at the last location along the path in the mail file (see PathDiagnostic::resetDiagnosticLocationToMainFile()).

Devin

Thanks for taking the time to clarify this!
-Alex