summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-10-31 17:38:12 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-10-31 17:38:12 +0000
commit57ef3a02e21a8f94d7a9c6d2fa8ea4996d52ea03 (patch)
treef8d206efb5127344b5811219cac79f92e8e5474f
parent5c4e07ae5c6f7f467b436f1b24f41ef4cf9897b3 (diff)
downloadbcm5719-llvm-57ef3a02e21a8f94d7a9c6d2fa8ea4996d52ea03.tar.gz
bcm5719-llvm-57ef3a02e21a8f94d7a9c6d2fa8ea4996d52ea03.zip
[analyzer] Enable retain count checking for OSObject by defa
The FP rate seems to be good enough now. Differential Revision: https://reviews.llvm.org/D53849 llvm-svn: 345745
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h2
-rw-r--r--clang/test/Analysis/osobject-retain-release.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
index e7684142611..388c2eaaf0c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
+++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.h
@@ -282,7 +282,7 @@ public:
~RetainCountChecker() override { DeleteContainerSeconds(DeadSymbolTags); }
bool shouldCheckOSObjectRetainCount() const {
- return Options.getBooleanOption("CheckOSObject", false, this);
+ return Options.getBooleanOption("CheckOSObject", true, this);
}
void checkEndAnalysis(ExplodedGraph &G, BugReporter &BR,
diff --git a/clang/test/Analysis/osobject-retain-release.cpp b/clang/test/Analysis/osobject-retain-release.cpp
index 17360ac3220..1159eaed0d8 100644
--- a/clang/test/Analysis/osobject-retain-release.cpp
+++ b/clang/test/Analysis/osobject-retain-release.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_analyze_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-config osx.cocoa.RetainCount:CheckOSObject=true -analyzer-output=text -verify %s
+// RUN: %clang_analyze_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-output=text -verify %s
struct OSMetaClass;
OpenPOWER on IntegriCloud