diff options
author | Devin Coughlin <dcoughlin@apple.com> | 2016-07-18 18:57:50 +0000 |
---|---|---|
committer | Devin Coughlin <dcoughlin@apple.com> | 2016-07-18 18:57:50 +0000 |
commit | d2387432bb569b1e96ff22839fe2cae25343e3f7 (patch) | |
tree | 78f289cd17015be51d3d12db190eba46eed717e8 /clang/lib/StaticAnalyzer/Frontend | |
parent | 3498ad11eb8b143d1fc3793f137cae49dbcaf710 (diff) | |
download | bcm5719-llvm-d2387432bb569b1e96ff22839fe2cae25343e3f7.tar.gz bcm5719-llvm-d2387432bb569b1e96ff22839fe2cae25343e3f7.zip |
Revert "[analyzer] Add checker modeling potential C++ self-assignment"
This reverts commit r275820. It is failing on the bots.
llvm-svn: 275880
Diffstat (limited to 'clang/lib/StaticAnalyzer/Frontend')
-rw-r--r-- | clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index 01324d0edd6..8ac229fc658 100644 --- a/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -431,13 +431,6 @@ static bool shouldSkipFunction(const Decl *D, // Count naming convention errors more aggressively. if (isa<ObjCMethodDecl>(D)) return false; - // We also want to reanalyze all C++ copy and move assignment operators to - // separately check the two cases where 'this' aliases with the parameter and - // where it may not. (cplusplus.SelfAssignmentChecker) - if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) { - if (MD->isCopyAssignmentOperator() || MD->isMoveAssignmentOperator()) - return false; - } // Otherwise, if we visited the function before, do not reanalyze it. return Visited.count(D); @@ -449,7 +442,9 @@ AnalysisConsumer::getInliningModeForFunction(const Decl *D, // We want to reanalyze all ObjC methods as top level to report Retain // Count naming convention errors more aggressively. But we should tune down // inlining when reanalyzing an already inlined function. - if (Visited.count(D) && isa<ObjCMethodDecl>(D)) { + if (Visited.count(D)) { + assert(isa<ObjCMethodDecl>(D) && + "We are only reanalyzing ObjCMethods."); const ObjCMethodDecl *ObjCM = cast<ObjCMethodDecl>(D); if (ObjCM->getMethodFamily() != OMF_init) return ExprEngine::Inline_Minimal; |