/// ActOnNamespaceAliasDef - This is called when a namespace alias definition
/// is parsed.
virtual DeclPtrTy ActOnNamespaceAliasDef(Scope *CurScope,
+ SourceLocation NamespaceLoc,
SourceLocation AliasLoc,
IdentifierInfo *Alias,
const CXXScopeSpec &SS,
- SourceLocation NamespaceLoc,
- IdentifierInfo *NamespaceName) {
+ SourceLocation IdentLoc,
+ IdentifierInfo *Ident) {
return DeclPtrTy();
}
DeclPtrTy ParseUsingDirective(unsigned Context, SourceLocation UsingLoc);
DeclPtrTy ParseUsingDeclaration(unsigned Context, SourceLocation UsingLoc);
DeclPtrTy ParseStaticAssertDeclaration();
- DeclPtrTy ParseNamespaceAlias(SourceLocation AliasLoc, IdentifierInfo *Alias);
+ DeclPtrTy ParseNamespaceAlias(SourceLocation NamespaceLoc,
+ SourceLocation AliasLoc, IdentifierInfo *Alias);
//===--------------------------------------------------------------------===//
// C++ 9: classes [class] and C structs/unions.
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();
/// 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");
}
// 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
void PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir);
virtual DeclPtrTy ActOnNamespaceAliasDef(Scope *CurScope,
+ SourceLocation NamespaceLoc,
SourceLocation AliasLoc,
IdentifierInfo *Alias,
const CXXScopeSpec &SS,
- SourceLocation NamespaceLoc,
- IdentifierInfo *NamespaceName);
+ SourceLocation IdentLoc,
+ IdentifierInfo *Ident);
/// AddCXXDirectInitializerToDecl - This action is called immediately after
/// ActOnDeclarator, when a C++ direct initializer is present.
}
Sema::DeclPtrTy Sema::ActOnNamespaceAliasDef(Scope *S,
+ SourceLocation NamespaceLoc,
SourceLocation AliasLoc,
IdentifierInfo *Alias,
const CXXScopeSpec &SS,
- SourceLocation NamespaceLoc,
- IdentifierInfo *NamespaceName) {
+ SourceLocation IdentLoc,
+ IdentifierInfo *Ident) {
// Check if we have a previous declaration with the same name.
if (NamedDecl *PrevDecl = LookupName(S, Alias, LookupOrdinaryName)) {
}
// Lookup the namespace name.
- LookupResult R = LookupParsedName(S, &SS, NamespaceName,
- LookupNamespaceName, false);
+ LookupResult R = LookupParsedName(S, &SS, Ident, LookupNamespaceName, false);
if (R.isAmbiguous()) {
- DiagnoseAmbiguousLookup(R, NamespaceName, NamespaceLoc);
+ DiagnoseAmbiguousLookup(R, Ident, IdentLoc);
return DeclPtrTy();
}