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
This commit is contained in:
Tim Shen 2017-10-03 19:39:02 +00:00
parent df63b96811
commit 77886fc0f0
2 changed files with 3 additions and 13 deletions

View File

@ -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),

View File

@ -463,10 +463,3 @@ void radar13722286::PrepareBitmap() {
// rdar://34210609
void _() { _(); }; // no-warning
// Do not assume that IOBSDNameMatching increments a reference counter,
// unless return type is CFMutableDictionaryRef.
void* IOBSDNameMatching();
void rdar33832412() {
void* x = IOBSDNameMatching(); // no-warning
}