diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-08-05 00:19:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-08-05 00:19:24 +0000 |
commit | 1d08fd9b7986dd2dd9969d5e40b2a329644e0e38 (patch) | |
tree | 7689e869785435f990f2fb19ef965c7f2163f29a /clang/lib | |
parent | 8a297e9f277fc8f34f57a59d2d75329e22520552 (diff) | |
download | bcm5719-llvm-1d08fd9b7986dd2dd9969d5e40b2a329644e0e38.tar.gz bcm5719-llvm-1d08fd9b7986dd2dd9969d5e40b2a329644e0e38.zip |
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
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Checker/CocoaConventions.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Checker/CocoaConventions.cpp b/clang/lib/Checker/CocoaConventions.cpp index 3ba887ccc7e..b446a048d48 100644 --- a/clang/lib/Checker/CocoaConventions.cpp +++ b/clang/lib/Checker/CocoaConventions.cpp @@ -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? |