From a8cb272a8884664497971e1a5777acaf304a8cd8 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Tue, 11 Feb 2014 22:14:03 +0000 Subject: [PATCH] Fix build error caused by r201186 (GCC's "declaration of X changes meaning of Y"). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201189 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../StaticAnalyzer/Core/BugReporter/BugType.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h index fd9db0bd2d..a9174ac569 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h @@ -30,24 +30,24 @@ class ExprEngine; class BugType { private: - const CheckName CheckName; + const CheckName Check; const std::string Name; const std::string Category; bool SuppressonSink; virtual void anchor(); public: - BugType(class CheckName Check, StringRef name, StringRef cat) - : CheckName(Check), Name(name), Category(cat), SuppressonSink(false) {} + BugType(class CheckName check, StringRef name, StringRef cat) + : Check(check), Name(name), Category(cat), SuppressonSink(false) {} BugType(const CheckerBase *checker, StringRef name, StringRef cat) - : CheckName(checker->getCheckName()), Name(name), Category(cat), + : Check(checker->getCheckName()), Name(name), Category(cat), SuppressonSink(false) {} virtual ~BugType() {} // FIXME: Should these be made strings as well? StringRef getName() const { return Name; } StringRef getCategory() const { return Category; } - StringRef getCheckName() const { return CheckName.getName(); } + StringRef getCheckName() const { return Check.getName(); } /// isSuppressOnSink - Returns true if bug reports associated with this bug /// type should be suppressed if the end node of the report is post-dominated @@ -62,9 +62,8 @@ class BuiltinBug : public BugType { const std::string desc; virtual void anchor(); public: - BuiltinBug(class CheckName CheckName, const char *name, - const char *description) - : BugType(CheckName, name, categories::LogicError), desc(description) {} + BuiltinBug(class CheckName check, const char *name, const char *description) + : BugType(check, name, categories::LogicError), desc(description) {} BuiltinBug(const CheckerBase *checker, const char *name, const char *description) -- 2.40.0