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:
parent
df63b96811
commit
77886fc0f0
@ -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),
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user