summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorKristof Umann <kristof.umann@ericsson.com>2019-09-12 19:09:24 +0000
committerKristof Umann <kristof.umann@ericsson.com>2019-09-12 19:09:24 +0000
commit692350b3324af16d1007a41089b9e5d684230ca3 (patch)
tree733a3089ae794fff900f1a6d01a1001c6e9a041d /lib/Analysis
parent2be1e8b8eeb9b906693e023618716e48d7ff30c0 (diff)
downloadclang-692350b3324af16d1007a41089b9e5d684230ca3.tar.gz
[analyzer][NFC] Fix inconsistent references to checkers as "checks"
Traditionally, clang-tidy uses the term check, and the analyzer uses checker, but in the very early years, this wasn't the case, and code originating from the early 2010's still incorrectly refer to checkers as checks. This patch attempts to hunt down most of these, aiming to refer to checkers as checkers, but preserve references to callback functions (like checkPreCall) as checks. Differential Revision: https://reviews.llvm.org/D67140 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/PathDiagnostic.cpp4
-rw-r--r--lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/PathDiagnostic.cpp b/lib/Analysis/PathDiagnostic.cpp
index 33cb813b19..764cb8ed0e 100644
--- a/lib/Analysis/PathDiagnostic.cpp
+++ b/lib/Analysis/PathDiagnostic.cpp
@@ -117,11 +117,11 @@ void PathPieces::flattenTo(PathPieces &Primary, PathPieces &Current,
PathDiagnostic::~PathDiagnostic() = default;
PathDiagnostic::PathDiagnostic(
- StringRef CheckName, const Decl *declWithIssue, StringRef bugtype,
+ StringRef CheckerName, const Decl *declWithIssue, StringRef bugtype,
StringRef verboseDesc, StringRef shortDesc, StringRef category,
PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique,
std::unique_ptr<FilesToLineNumsMap> ExecutedLines)
- : CheckName(CheckName), DeclWithIssue(declWithIssue),
+ : CheckerName(CheckerName), DeclWithIssue(declWithIssue),
BugType(StripTrailingDots(bugtype)),
VerboseDesc(StripTrailingDots(verboseDesc)),
ShortDesc(StripTrailingDots(shortDesc)),
diff --git a/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp b/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp
index abf8329cdd..fd210d733f 100644
--- a/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp
+++ b/lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp
@@ -37,7 +37,7 @@ void MainCallChecker::checkPreStmt(const CallExpr *CE,
BT.reset(new BugType(this, "call to main", "example analyzer plugin"));
auto report =
- std::make_unique<PathSensitiveBugReport>(*BT, BT->getName(), N);
+ std::make_unique<PathSensitiveBugReport>(*BT, BT->getDescription(), N);
report->addRange(Callee->getSourceRange());
C.emitReport(std::move(report));
}