aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-18 00:28:11 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-18 00:28:11 +0000
commit321c22f1c4271c3d9a3d4d3fc18847f948ab595b (patch)
tree293c5da5b500bcf3bfcda607fdb3dcb36bc377f1 /lib/Sema/SemaDeclObjC.cpp
parentf74a419b7219d050e1e40ff920d30832e903e5a8 (diff)
Add SourceLocations to ObjCClassDecl for the class identifiers referenced by @class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89170 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 8961cf165a..0c5569caff 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1197,10 +1197,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, CurContext, AtClassLoc,
- IdentList[i],
- // FIXME: need to get the 'real'
- // identifier loc from the parser.
- AtClassLoc, true);
+ IdentList[i], IdentLocs[i], true);
// Push the ObjCInterfaceDecl on the scope chain but do *not* add it to
// the current DeclContext. This prevents clients that walk DeclContext
@@ -1214,8 +1211,9 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc,
Interfaces.push_back(IDecl);
}
+ assert(Interfaces.size() == NumElts);
ObjCClassDecl *CDecl = ObjCClassDecl::Create(Context, CurContext, AtClassLoc,
- &Interfaces[0],
+ Interfaces.data(), IdentLocs,
Interfaces.size());
CurContext->addDecl(CDecl);
CheckObjCDeclScope(CDecl);