aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/DeclObjC.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index a6f60f383e..34fd4d71e7 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -814,7 +814,9 @@ public:
}
void setSuperClass(ObjCInterfaceDecl * superCls) {
- data().SuperClass = superCls;
+ data().SuperClass =
+ (superCls && superCls->hasDefinition()) ? superCls->getDefinition()
+ : superCls;
}
ObjCCategoryDecl* getCategoryList() const {