aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-09-11 00:12:01 +0000
committerSteve Naroff <snaroff@apple.com>2009-09-11 00:12:01 +0000
commit8b26cbd4e4c01cb7a06ec2f794f2fce3b58cf4d0 (patch)
tree11395a4460738b58ad89aae9fb409d4429a878ff /lib/Sema
parent1860a31edf826bc4001e153f1a8c10e17d97af87 (diff)
Make sure ObjCInterfaceDecl's that are forward declared always contain a valid location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 5b52ba9c8c..43d38f0679 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -111,6 +111,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc,
} else {
IDecl->setLocation(AtInterfaceLoc);
IDecl->setForwardDecl(false);
+ IDecl->setClassLoc(ClassLoc);
}
} else {
IDecl = ObjCInterfaceDecl::Create(Context, CurContext, AtInterfaceLoc,
@@ -1141,7 +1142,10 @@ 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], SourceLocation(), true);
+ IdentList[i],
+ // FIXME: need to get the 'real'
+ // identifier loc from the parser.
+ AtClassLoc, true);
PushOnScopeChains(IDecl, TUScope);
}