diff options
author | Steve Naroff <snaroff@apple.com> | 2008-04-11 19:35:35 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-04-11 19:35:35 +0000 |
commit | d6a07aaf62b40cdfbd96f6b874d02b06fc22d015 (patch) | |
tree | 0d16a3586f7858fabd5c32c0f97a76b06eb6e6d1 /lib/Sema/SemaDeclObjC.cpp | |
parent | bcf50ad8c7248c6d371b4d300e40daf46c06fa39 (diff) |
Add class and super class location info to ObjCInterfaceDecl...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 127645044c..776a50f6f2 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -98,7 +98,7 @@ Sema::DeclTy *Sema::ActOnStartClassInterface( } else { IDecl = ObjCInterfaceDecl::Create(Context, AtInterfaceLoc, NumProtocols, - ClassName); + ClassName, ClassLoc); ObjCInterfaceDecls[ClassName] = IDecl; // Remember that this needs to be removed when the scope is popped. @@ -126,6 +126,7 @@ Sema::DeclTy *Sema::ActOnStartClassInterface( } } IDecl->setSuperClass(SuperClassEntry); + IDecl->setSuperClassLoc(SuperLoc); IDecl->setLocEnd(SuperLoc); } else { // we have a root class. IDecl->setLocEnd(ClassLoc); @@ -383,7 +384,7 @@ Sema::DeclTy *Sema::ActOnStartClassImplementation( // Legacy case of @implementation with no corresponding @interface. // Build, chain & install the interface decl into the identifier. IDecl = ObjCInterfaceDecl::Create(Context, AtClassImplLoc, 0, ClassName, - false, true); + ClassLoc, false, true); ObjCInterfaceDecls[ClassName] = IDecl; IDecl->setSuperClass(SDecl); IDecl->setLocEnd(ClassLoc); @@ -591,7 +592,7 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, ObjCInterfaceDecl *IDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl); if (!IDecl) { // Not already seen? Make a forward decl. IDecl = ObjCInterfaceDecl::Create(Context, AtClassLoc, 0, IdentList[i], - true); + SourceLocation(), true); ObjCInterfaceDecls[IdentList[i]] = IDecl; // Remember that this needs to be removed when the scope is popped. |