diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-03-21 10:50:08 +0000 |
commit | 1e255aab650a7fa2047fd953cae65b12215280af (patch) | |
tree | 508d4388db78f87d35bf26a0400b4b03bc4c1f13 /lib/AST/DeclObjC.cpp | |
parent | 1033b7c1e32962948b01a25145829f17bc70a8de (diff) | |
download | FreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.zip FreeBSD-src-1e255aab650a7fa2047fd953cae65b12215280af.tar.gz |
Update clang to r99115.
Diffstat (limited to 'lib/AST/DeclObjC.cpp')
-rw-r--r-- | lib/AST/DeclObjC.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/AST/DeclObjC.cpp b/lib/AST/DeclObjC.cpp index 7d1033d..ab6b9e1 100644 --- a/lib/AST/DeclObjC.cpp +++ b/lib/AST/DeclObjC.cpp @@ -743,7 +743,10 @@ ObjCCategoryImplDecl::Create(ASTContext &C, DeclContext *DC, } ObjCCategoryDecl *ObjCCategoryImplDecl::getCategoryDecl() const { - return getClassInterface()->FindCategoryDeclaration(getIdentifier()); + // The class interface might be NULL if we are working with invalid code. + if (const ObjCInterfaceDecl *ID = getClassInterface()) + return ID->FindCategoryDeclaration(getIdentifier()); + return 0; } |