forked from OSchip/llvm-project
Correctly handle 'Class<...>' when examining Cocoa conventions in the static analyzer. Fixes a crash reported in <rdar://problem/8272168>. Patch by Henry Mason!
llvm-svn: 110289
This commit is contained in:
parent
8a297e9f27
commit
1d08fd9b79
|
@ -173,9 +173,10 @@ bool cocoa::isCocoaObjectRef(QualType Ty) {
|
|||
if (!PT)
|
||||
return true;
|
||||
|
||||
// We assume that id<..>, id, and "Class" all represent tracked objects.
|
||||
// We assume that id<..>, id, Class, and Class<..> all represent tracked
|
||||
// objects.
|
||||
if (PT->isObjCIdType() || PT->isObjCQualifiedIdType() ||
|
||||
PT->isObjCClassType())
|
||||
PT->isObjCClassType() || PT->isObjCQualifiedClassType())
|
||||
return true;
|
||||
|
||||
// Does the interface subclass NSObject?
|
||||
|
|
|
@ -1358,3 +1358,12 @@ void test_blocks_1_indirect_retain_via_call(void) {
|
|||
}
|
||||
@end
|
||||
|
||||
// <rdar://problem/8272168> - Correcly handle Class<...> in Cocoa Conventions
|
||||
// detector.
|
||||
|
||||
@protocol Prot_R8272168 @end
|
||||
Class <Prot_R8272168> GetAClassThatImplementsProt_R8272168();
|
||||
void r8272168() {
|
||||
GetAClassThatImplementsProt_R8272168();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue