[llvm-branch-commits] [cfe-tag] r98885 - /cfe/tags/cremebrulee/cremebrulee-46.1/lib/AST/Expr.cpp
Ted Kremenek
kremenek at apple.com
Thu Mar 18 15:28:05 PDT 2010
Author: kremenek
Date: Thu Mar 18 17:28:04 2010
New Revision: 98885
URL: http://llvm.org/viewvc/llvm-project?rev=98885&view=rev
Log:
Merge in r98874.
Modified:
cfe/tags/cremebrulee/cremebrulee-46.1/lib/AST/Expr.cpp
Modified: cfe/tags/cremebrulee/cremebrulee-46.1/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/tags/cremebrulee/cremebrulee-46.1/lib/AST/Expr.cpp?rev=98885&r1=98884&r2=98885&view=diff
==============================================================================
--- cfe/tags/cremebrulee/cremebrulee-46.1/lib/AST/Expr.cpp (original)
+++ cfe/tags/cremebrulee/cremebrulee-46.1/lib/AST/Expr.cpp Thu Mar 18 17:28:04 2010
@@ -227,7 +227,10 @@
llvm::raw_svector_ostream Out(Name);
Out << (MD->isInstanceMethod() ? '-' : '+');
Out << '[';
- Out << MD->getClassInterface()->getNameAsString();
+ // For incorrect code, there might not be an ObjCInterfaceDecl. Do
+ // a null check to avoid a crash.
+ if (const ObjCInterfaceDecl *ID = MD->getClassInterface())
+ Out << ID->getNameAsString();
if (const ObjCCategoryImplDecl *CID =
dyn_cast<ObjCCategoryImplDecl>(MD->getDeclContext())) {
Out << '(';
More information about the llvm-branch-commits
mailing list