[PATCH] D37437: [analyzer] Fix some checker's output plist not containing the checker name

Anna Zaks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 20:20:50 PDT 2017

zaks.anna added a comment.

Looks like the need to have the checker name in BugType along with the checker names not being initialized early enough, leads to worse checker-writer experience. Is there a way to ensure that the checker names are set at construction?

Comment at: lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp:131
      << "' inside of critical section";
-  auto R = llvm::make_unique<BugReport>(*BlockInCritSectionBugType, os.str(), ErrNode);
+  if (!BlockInCritSectionBugType)
+    BlockInCritSectionBugType.reset(
nit: I prefer to use '{' here since the if body spans multiple lines.

Comment at: lib/StaticAnalyzer/Checkers/CStringChecker.cpp:308
   if (StOutBound && !StInBound) {
+    if (!Filter.CheckCStringOutOfBounds)
+      return state;
This seems to be related to the change in the test, correct? In the future, please, split changes like this one into their own separate commits.


More information about the cfe-commits mailing list