[PATCH] D38844: [analyzer] Make issue hash related tests more concise
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 27 11:22:53 PDT 2017
xazax.hun added inline comments.
================
Comment at: lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp:68
// (globals should not be invalidated, etc), hence the use of evalCall.
- FnCheck Handler = llvm::StringSwitch<FnCheck>(C.getCalleeName(CE))
- .Case("clang_analyzer_eval", &ExprInspectionChecker::analyzerEval)
- .Case("clang_analyzer_checkInlined",
- &ExprInspectionChecker::analyzerCheckInlined)
- .Case("clang_analyzer_crash", &ExprInspectionChecker::analyzerCrash)
- .Case("clang_analyzer_warnIfReached",
- &ExprInspectionChecker::analyzerWarnIfReached)
- .Case("clang_analyzer_warnOnDeadSymbol",
- &ExprInspectionChecker::analyzerWarnOnDeadSymbol)
- .StartsWith("clang_analyzer_explain", &ExprInspectionChecker::analyzerExplain)
- .StartsWith("clang_analyzer_dump", &ExprInspectionChecker::analyzerDump)
- .Case("clang_analyzer_getExtent", &ExprInspectionChecker::analyzerGetExtent)
- .Case("clang_analyzer_printState",
- &ExprInspectionChecker::analyzerPrintState)
- .Case("clang_analyzer_numTimesReached",
- &ExprInspectionChecker::analyzerNumTimesReached)
- .Default(nullptr);
+ FnCheck Handler =
+ llvm::StringSwitch<FnCheck>(C.getCalleeName(CE))
----------------
zaks.anna wrote:
> Unrelated change?
Since I touched this snippet I reformatted it using clang-format. Apart from adding a new case before the default all other changes are formatting changes. I will revert the formatting changes. So in general, we prefer to minimize the diffs over converging to be clang-formatted?
https://reviews.llvm.org/D38844
More information about the cfe-commits
mailing list