aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclObjC.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index d318fc27a8..88877cfe0b 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/include/clang/AST/DeclObjC.h
@@ -1122,6 +1122,12 @@ protected:
ClassInterface(classInterface) {}
public:
+ virtual Decl *getCanonicalDecl() {
+ if (Decl *interface = getClassInterface())
+ return interface;
+ return this;
+ }
+
const ObjCInterfaceDecl *getClassInterface() const { return ClassInterface; }
ObjCInterfaceDecl *getClassInterface() { return ClassInterface; }
void setClassInterface(ObjCInterfaceDecl *IFace);