diff options
author | Tim Shen <timshen91@gmail.com> | 2017-10-03 19:39:02 +0000 |
---|---|---|
committer | Tim Shen <timshen91@gmail.com> | 2017-10-03 19:39:02 +0000 |
commit | 77886fc0f0754bf8d810a16a2ae5ea9db7e00a7e (patch) | |
tree | b5f214c1859a051cf10e89c4f1a099cfd666683b /clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | |
parent | df63b96811d6faea8ccaac79780af9ab2a629356 (diff) | |
download | bcm5719-llvm-77886fc0f0754bf8d810a16a2ae5ea9db7e00a7e.tar.gz bcm5719-llvm-77886fc0f0754bf8d810a16a2ae5ea9db7e00a7e.zip |
Revert r314820 "[Analyzer] More granular special casing in RetainCountChecker"
The test retain-release.m fails with this patch.
Differential Revision: https://reviews.llvm.org/D38487
llvm-svn: 314831
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 7212d296a12..165bc049938 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -1062,7 +1062,6 @@ RetainSummaryManager::getFunctionSummary(const FunctionDecl *FD) { // Inspect the result type. QualType RetTy = FT->getReturnType(); - StringRef RetTyName = RetTy.getAsString(); // FIXME: This should all be refactored into a chain of "summary lookup" // filters. @@ -1082,14 +1081,12 @@ RetainSummaryManager::getFunctionSummary(const FunctionDecl *FD) { AllowAnnotations = false; } else if (FName == "CFPlugInInstanceCreate") { S = getPersistentSummary(RetEffect::MakeNoRet()); - } else if (FName == "IORegistryEntrySearchCFProperty" - || (RetTyName == "CFMutableDictionaryRef" && ( - FName == "IOBSDNameMatching" || + } else if (FName == "IOBSDNameMatching" || FName == "IOServiceMatching" || FName == "IOServiceNameMatching" || + FName == "IORegistryEntrySearchCFProperty" || FName == "IORegistryEntryIDMatching" || - FName == "IOOpenFirmwarePathMatching" - ))) { + FName == "IOOpenFirmwarePathMatching") { // Part of <rdar://problem/6961230>. (IOKit) // This should be addressed using a API table. S = getPersistentSummary(RetEffect::MakeOwned(RetEffect::CF), |