This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] NFC: Move PathDiagnostic to libAnalysis.
ClosedPublic

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

Details

Summary

At this point PathDiagnostic, PathDiagnosticLocation, PathDiagnosticPiece structures no longer rely on anything specific to Static Analyzer, so we can move them out for everybody to use.

It's not the point where I'm happy with the API that i'm exposing this way; it's just the point where i expose it "because i can", i.e. the technical difficulties have been sorted out and a relatively clear separation between aspects of the API that are specific to the Analyzer and the aspects that aren't necessarily specific to the Analyzer has been achieved.

PathDiagnosticConsumers are still to be handed off.

Diff Detail

Event Timeline

NoQ created this revision.Sep 10 2019, 4:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 10 2019, 4:36 PM
NoQ marked an inline comment as done.
NoQ added inline comments.
clang-tools-extra/clang-tidy/ClangTidy.cpp
26

This needed to go up because that's where CLANG_ENABLE_STATIC_ANALYZER is defined.

Looks great! Are we sure that PathDiagnostic.h is a good header name?

clang-tools-extra/clang-tidy/ClangTidy.cpp
26

Let's add some scary comments then, to warn everyone trying to blindly clang-format this file.

gribozavr accepted this revision.Sep 11 2019, 5:42 AM
gribozavr added inline comments.
clang-tools-extra/clang-tidy/ClangTidy.cpp
26

I'd suggest to move all conditionally-included headers into a separate "section" below, separated by a newline from the rest of the headers. clang-format will respect that and won't reorder sections.

This revision is now accepted and ready to land.Sep 11 2019, 5:42 AM
NoQ marked 2 inline comments as done.Sep 11 2019, 1:53 PM

Looks great! Are we sure that PathDiagnostic.h is a good header name?

Not really, but i haven't come up with a better name yet (see also the summary of D67422).

P.S. Sry, i seem to have had a spam streak today.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 11 2019, 1:54 PM