diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-15 21:39:32 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-15 21:39:32 +0000 |
commit | cea2e3d7ea9cdc763f7a98937c09769cd4d1f582 (patch) | |
tree | b953a0c4cdd914b8d992703cc8448310fd1502ed | |
parent | f55a869ba4c651943715d13d9b9c50a2e752a6ac (diff) |
The canonical decl for an ObjCImplDecl is it's interface class. Fixes rdar://8728637.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135304 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/DeclObjC.h | 6 |
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); |