Author: akirtzidis
Date: Fri Jul 15 16:39:32 2011
New Revision: 135304
URL: http://llvm.org/viewvc/llvm-project?rev=135304&view=rev
Log:
The canonical decl for an ObjCImplDecl is it's interface class. Fixes
rdar://8728637.
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=135304&r1=135303&r2=135304&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Fri Jul 15 16:39:32 2011
@@ -1122,6 +1122,12 @@
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);
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits