[PATCH] D67422: [analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 13 10:07:43 PDT 2020
NoQ updated this revision to Diff 285417.
NoQ added a comment.
In D67422#2215371 <https://reviews.llvm.org/D67422#2215371>, @Szelethus wrote:
> The patch looks great. I guess the only remaining discussion remains as to whether this should be in `libAnalysis`, or somewhere else. Here is my take: Since clang-tidy, CSA, and some other parts of the compiler (like uninitialized variable warnings) are static analyzers within the same infrastructure, it makes sense for them to have a common library. I see that diagnostics aren't really analyses. `libFrontend` or `libDriver`, which, as I understand it contains most the diagnostics machinery for clang aren't viable alternatives because of the library dependencies. So, I think if `libAnalysis` was called `libStaticAnalysisCommon`, we would be golden, but that would screw over downstream developers for negligible gain. While I'm not terribly experiences in library layout design, for the time being, the move to `libAnalysis` seems appropriate.
I agree that there's something here and also that it's not that urgent/critical to rename things at this point. It's not that people suffer horribly from having to link to only some of these things.
> I see that we're still heavily tied to StaticAnalyzer headers. Doesn't that violate the module system, as `libAnalysis` is a dependency of `libStaticAnalyzerCore`? `AnalyzerOptions` and `AnalysisConsumer` (that last one in particular) seem deeply integrated into these consumers.
Mmm, these are dead includes now. Reliance on `AnalyzerOptions` was supposed to be eliminated since D67420 <https://reviews.llvm.org/D67420> and these are in fact rebase conflicts. Fxd.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67422/new/
https://reviews.llvm.org/D67422
Files:
clang/include/clang/Analysis/PathDiagnosticConsumers.def
clang/include/clang/Analysis/PathDiagnosticConsumers.h
clang/include/clang/StaticAnalyzer/Core/Analyses.def
clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
clang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
clang/lib/Analysis/CMakeLists.txt
clang/lib/Analysis/HTMLPathDiagnosticConsumer.cpp
clang/lib/Analysis/PlistHTMLPathDiagnosticConsumer.cpp
clang/lib/Analysis/PlistPathDiagnosticConsumer.cpp
clang/lib/Analysis/SarifPathDiagnosticConsumer.cpp
clang/lib/Analysis/TextPathDiagnosticConsumer.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/StaticAnalyzer/Core/CMakeLists.txt
clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
clang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp
clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67422.285417.patch
Type: text/x-patch
Size: 34171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200813/8190d0ee/attachment-0001.bin>
More information about the cfe-commits
mailing list