From 692350b3324af16d1007a41089b9e5d684230ca3 Mon Sep 17 00:00:00 2001 From: Kristof Umann Date: Thu, 12 Sep 2019 19:09:24 +0000 Subject: [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 --- lib/Analysis/PathDiagnostic.cpp | 4 ++-- lib/Analysis/plugins/SampleAnalyzer/MainCallChecker.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Analysis') 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 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(*BT, BT->getName(), N); + std::make_unique(*BT, BT->getDescription(), N); report->addRange(Callee->getSourceRange()); C.emitReport(std::move(report)); } -- cgit v1.2.1