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

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 10 16:30:09 PDT 2019


NoQ created this revision.
NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, Szelethus, baloghadamsoftware, Charusso.
Herald added subscribers: cfe-commits, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet.
Herald added a project: clang.
NoQ added a parent revision: D67382: [analyzer] NFC: Move getStmt() and createEndOfPath() out of PathDiagnostic..

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.


Repository:
  rC Clang

https://reviews.llvm.org/D67418

Files:
  clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
  clang/lib/StaticAnalyzer/Core/BugReporter.cpp
  clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67418.219624.patch
Type: text/x-patch
Size: 7461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190910/7fa35f50/attachment.bin>


More information about the cfe-commits mailing list