aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-03-28 22:53:22 +0000
committerAnders Carlsson <andersca@mac.com>2009-03-28 22:53:22 +0000
commit03bd5a1e9a54b62b10ae8aeb6eb5245e2031d98b (patch)
tree915fa8c4b2df805b94221b9e305c891c99347149 /lib/Parse/ParseDeclCXX.cpp
parent2a8d6b0852c47e43dac5c1679b4609b752234ed7 (diff)
Parse the location of the 'namespace' token to ActOnNamespaceAliasDef. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index 37eb34e777..4201e1cb1e 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -62,7 +62,7 @@ Parser::DeclPtrTy Parser::ParseNamespace(unsigned Context) {
if (Tok.is(tok::equal))
// FIXME: Verify no attributes were present.
- return ParseNamespaceAlias(IdentLoc, Ident);
+ return ParseNamespaceAlias(NamespaceLoc, IdentLoc, Ident);
if (Tok.is(tok::l_brace)) {
SourceLocation LBrace = ConsumeBrace();
@@ -99,7 +99,8 @@ Parser::DeclPtrTy Parser::ParseNamespace(unsigned Context) {
/// ParseNamespaceAlias - Parse the part after the '=' in a namespace
/// alias definition.
///
-Parser::DeclPtrTy Parser::ParseNamespaceAlias(SourceLocation AliasLoc,
+Parser::DeclPtrTy Parser::ParseNamespaceAlias(SourceLocation NamespaceLoc,
+ SourceLocation AliasLoc,
IdentifierInfo *Alias) {
assert(Tok.is(tok::equal) && "Not equal token");
@@ -117,15 +118,15 @@ Parser::DeclPtrTy Parser::ParseNamespaceAlias(SourceLocation AliasLoc,
}
// Parse identifier.
- IdentifierInfo *NamespaceName = Tok.getIdentifierInfo();
- SourceLocation NamespaceLoc = ConsumeToken();
+ IdentifierInfo *Ident = Tok.getIdentifierInfo();
+ SourceLocation IdentLoc = ConsumeToken();
// Eat the ';'.
ExpectAndConsume(tok::semi, diag::err_expected_semi_after,
"namespace name", tok::semi);
- return Actions.ActOnNamespaceAliasDef(CurScope, AliasLoc, Alias, SS,
- NamespaceLoc, NamespaceName);
+ return Actions.ActOnNamespaceAliasDef(CurScope, NamespaceLoc, AliasLoc, Alias,
+ SS, IdentLoc, Ident);
}
/// ParseLinkage - We know that the current token is a string_literal