diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index 8126485c4ff..0b73ca5b578 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -37,11 +37,12 @@ ObjCMethodDecl *ObjCMethodDecl::Create(ASTContext &C, ObjCInterfaceDecl *ObjCInterfaceDecl::Create(ASTContext &C, SourceLocation atLoc, unsigned numRefProtos, - IdentifierInfo *Id, + IdentifierInfo *Id, + SourceLocation ClassLoc, bool ForwardDecl, bool isInternal){ void *Mem = C.getAllocator().Allocate<ObjCInterfaceDecl>(); return new (Mem) ObjCInterfaceDecl(atLoc, numRefProtos, - Id, ForwardDecl, + Id, ClassLoc, ForwardDecl, isInternal); } diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index a0d4ff79956..92858726b48 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -112,7 +112,8 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer) // Synthesize "@class Protocol; ObjCInterfaceDecl *ProtocolDecl = ObjCInterfaceDecl::Create(Context, SourceLocation(), 0, - &Context.Idents.get("Protocol"), true); + &Context.Idents.get("Protocol"), + SourceLocation(), true); Context.setObjCProtoType(Context.getObjCInterfaceType(ProtocolDecl)); // Synthesize "typedef struct objc_object { Class isa; } *id;" diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 127645044c3..776a50f6f2a 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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. |