[analyzer] Hotfix for build failure due to declaration shadowing in r276782.
authorArtem Dergachev <artem.dergachev@gmail.com>
Tue, 26 Jul 2016 19:05:22 +0000 (19:05 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Tue, 26 Jul 2016 19:05:22 +0000 (19:05 +0000)
CloneDetector member variable is shadowing the class with the same name,
which causes build failures on some platforms.

llvm-svn: 276791

clang/lib/StaticAnalyzer/Checkers/CloneChecker.cpp

index 5bd4f6b..87c813d 100644 (file)
@@ -26,7 +26,7 @@ using namespace ento;
 namespace {
 class CloneChecker
     : public Checker<check::ASTCodeBody, check::EndOfTranslationUnit> {
-  mutable CloneDetector CloneDetector;
+  mutable CloneDetector Detector;
 
 public:
   void checkASTCodeBody(const Decl *D, AnalysisManager &Mgr,
@@ -41,7 +41,7 @@ void CloneChecker::checkASTCodeBody(const Decl *D, AnalysisManager &Mgr,
                                     BugReporter &BR) const {
   // Every statement that should be included in the search for clones needs to
   // be passed to the CloneDetector.
-  CloneDetector.analyzeCodeBody(D);
+  Detector.analyzeCodeBody(D);
 }
 
 void CloneChecker::checkEndOfTranslationUnit(const TranslationUnitDecl *TU,
@@ -58,7 +58,7 @@ void CloneChecker::checkEndOfTranslationUnit(const TranslationUnitDecl *TU,
   SourceManager &SM = BR.getSourceManager();
 
   std::vector<CloneDetector::CloneGroup> CloneGroups;
-  CloneDetector.findClones(CloneGroups, MinComplexity);
+  Detector.findClones(CloneGroups, MinComplexity);
 
   DiagnosticsEngine &DiagEngine = Mgr.getDiagnostic();