[PATCH] D38844: [analyzer] Make issue hash related tests more concise

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 04:49:55 PDT 2017


NoQ accepted this revision.
NoQ added a comment.
This revision is now accepted and ready to land.

Great stuff!



================
Comment at: lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:84
           &ExprInspectionChecker::analyzerNumTimesReached)
+    .Case("clang_analyzer_hashDump", &ExprInspectionChecker::analyzerDumpHash)
     .Default(nullptr);
----------------
`hashDump` <=> `DumpHash` (looks slightly typo-ish)


================
Comment at: lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:288-295
+    const LangOptions &Opts = C.getLangOpts();
+    const SourceManager &SM = C.getSourceManager();
+    FullSourceLoc FL(CE->getArg(0)->getLocStart(), SM);
+    std::string HashContent =
+        GetIssueString(SM, FL, getCheckName().getName(), "Category",
+                       C.getLocationContext()->getDecl(), Opts);
+
----------------
Accidentally 4 spaces here.


https://reviews.llvm.org/D38844





More information about the cfe-commits mailing list