diff options
author | George Karpenkov <ekarpenkov@apple.com> | 2019-01-25 01:24:04 +0000 |
---|---|---|
committer | George Karpenkov <ekarpenkov@apple.com> | 2019-01-25 01:24:04 +0000 |
commit | 6fdd2bd503c908eddfc2237fe8a5293ab54047ea (patch) | |
tree | c9d53b46b39c2bd5e562820cfa7c9476dfc2910f /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h | |
parent | 7faa1de17da4f28cc0fdc78b15dc6ad790767e07 (diff) | |
download | bcm5719-llvm-6fdd2bd503c908eddfc2237fe8a5293ab54047ea.tar.gz bcm5719-llvm-6fdd2bd503c908eddfc2237fe8a5293ab54047ea.zip |
[analyzer] Port RetainSummaryManager to the new AnyCall interface, decouple ARCMT from the analyzer
rdar://19694750
Differential Revision: https://reviews.llvm.org/D57127
llvm-svn: 352149
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h index 8e74f6cbb0d..775cd21851d 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h @@ -21,6 +21,7 @@ #include "clang/AST/DeclObjC.h" #include "clang/AST/ParentMap.h" #include "clang/Analysis/DomainSpecific/CocoaConventions.h" +#include "clang/Analysis/RetainSummaryManager.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/SourceManager.h" #include "clang/Analysis/SelectorExtras.h" @@ -32,7 +33,6 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h" -#include "clang/StaticAnalyzer/Core/RetainSummaryManager.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/ImmutableList.h" @@ -275,15 +275,9 @@ public: RetainCountChecker() {}; RetainSummaryManager &getSummaryManager(ASTContext &Ctx) const { - // FIXME: We don't support ARC being turned on and off during one analysis. - // (nor, for that matter, do we support changing ASTContexts) - bool ARCEnabled = (bool)Ctx.getLangOpts().ObjCAutoRefCount; - if (!Summaries) { - Summaries.reset(new RetainSummaryManager( - Ctx, ARCEnabled, TrackObjCAndCFObjects, TrackOSObjects)); - } else { - assert(Summaries->isARCEnabled() == ARCEnabled); - } + if (!Summaries) + Summaries.reset( + new RetainSummaryManager(Ctx, TrackObjCAndCFObjects, TrackOSObjects)); return *Summaries; } |