forked from OSchip/llvm-project
Fixed a crash in Clang when a superclass of an
Objective-C class doesn't have a definition but Clang tries to read through its protocols anyway. llvm-svn: 154538
This commit is contained in:
parent
d1411e1aa2
commit
18a11e33ea
|
@ -0,0 +1,15 @@
|
|||
Index: lib/AST/DeclObjC.cpp
|
||||
===================================================================
|
||||
--- lib/AST/DeclObjC.cpp (revision 152265)
|
||||
+++ lib/AST/DeclObjC.cpp (working copy)
|
||||
@@ -330,6 +330,10 @@
|
||||
LoadExternalDefinition();
|
||||
|
||||
while (ClassDecl != NULL) {
|
||||
+ // FIXME: Should make sure no callers ever do this.
|
||||
+ if (!ClassDecl->hasDefinition())
|
||||
+ return 0;
|
||||
+
|
||||
if ((MethodDecl = ClassDecl->getMethod(Sel, isInstance)))
|
||||
return MethodDecl;
|
||||
|
Loading…
Reference in New Issue