This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] NFC: Move PathDiagnostic::resetDiagnosticLocationToMainFile to bug reporter.
ClosedPublic

Authored by NoQ on Sep 10 2019, 4:29 PM.

Details

Summary

This function uses AnalysisManager, which is Static Analyzer-specific entity, but i want path diagnostics to be independent of the Static Analyzer.

In fact it only uses AnalysisManager::isInCodeFile() which is essentially static and might be useful outside of the Analyzer; however, Clang-Tidy has its own idea of what code to analyze, so i feel i can't enforce this method on them.

More importantly, though, i'm only handing off the PathDiagnostic data structure, but not the procedure of constructing those particularly neat analyzer-like path diagnostics. And this whole function is definitely part of the construction procedure, not of the data structure itself, so it shouldn't be handed off.

Diff Detail

Repository
rL LLVM

Event Timeline

NoQ created this revision.Sep 10 2019, 4:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2019, 4:29 PM
This revision is now accepted and ready to land.Sep 11 2019, 2:47 AM
gribozavr accepted this revision.Sep 11 2019, 5:42 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 11 2019, 1:54 PM