Add an ActOnNamespaceAliasDef action and have the parser call it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67915 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anders Carlsson 2009-03-28 05:27:17 +00:00
Родитель 1266eca868
Коммит dbb0094f44
4 изменённых файлов: 30 добавлений и 2 удалений

Просмотреть файл

@ -842,6 +842,17 @@ public:
IdentifierInfo *NamespcName, IdentifierInfo *NamespcName,
AttributeList *AttrList); AttributeList *AttrList);
/// ActOnNamespaceAliasDef - This is called when a namespace alias definition
/// is parsed.
virtual DeclTy *ActOnNamespaceAliasDef(Scope *CurScope,
SourceLocation AliasLoc,
IdentifierInfo *Alias,
const CXXScopeSpec &SS,
SourceLocation NamespaceLoc,
IdentifierInfo *NamespaceName) {
return 0;
}
/// ActOnParamDefaultArgument - Parse default argument for function parameter /// ActOnParamDefaultArgument - Parse default argument for function parameter
virtual void ActOnParamDefaultArgument(DeclTy *param, virtual void ActOnParamDefaultArgument(DeclTy *param,
SourceLocation EqualLoc, SourceLocation EqualLoc,

Просмотреть файл

@ -124,7 +124,8 @@ Parser::DeclTy *Parser::ParseNamespaceAlias(SourceLocation AliasLoc,
ExpectAndConsume(tok::semi, diag::err_expected_semi_after, ExpectAndConsume(tok::semi, diag::err_expected_semi_after,
"namespace name", tok::semi); "namespace name", tok::semi);
return 0; return Actions.ActOnNamespaceAliasDef(CurScope, AliasLoc, Alias, SS,
NamespaceLoc, NamespaceName);
} }
/// ParseLinkage - We know that the current token is a string_literal /// ParseLinkage - We know that the current token is a string_literal

Просмотреть файл

@ -1370,9 +1370,16 @@ public:
SourceLocation IdentLoc, SourceLocation IdentLoc,
IdentifierInfo *NamespcName, IdentifierInfo *NamespcName,
AttributeList *AttrList); AttributeList *AttrList);
void PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir); void PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir);
virtual DeclTy *ActOnNamespaceAliasDef(Scope *CurScope,
SourceLocation AliasLoc,
IdentifierInfo *Alias,
const CXXScopeSpec &SS,
SourceLocation NamespaceLoc,
IdentifierInfo *NamespaceName);
/// AddCXXDirectInitializerToDecl - This action is called immediately after /// AddCXXDirectInitializerToDecl - This action is called immediately after
/// ActOnDeclarator, when a C++ direct initializer is present. /// ActOnDeclarator, when a C++ direct initializer is present.
/// e.g: "int x(1);" /// e.g: "int x(1);"

Просмотреть файл

@ -1675,6 +1675,15 @@ void Sema::PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir) {
S->PushUsingDirective(UDir); S->PushUsingDirective(UDir);
} }
Sema::DeclTy *Sema::ActOnNamespaceAliasDef(Scope *CurScope,
SourceLocation AliasLoc,
IdentifierInfo *Alias,
const CXXScopeSpec &SS,
SourceLocation NamespaceLoc,
IdentifierInfo *NamespaceName) {
return 0;
}
/// AddCXXDirectInitializerToDecl - This action is called immediately after /// AddCXXDirectInitializerToDecl - This action is called immediately after
/// ActOnDeclarator, when a C++ direct initializer is present. /// ActOnDeclarator, when a C++ direct initializer is present.
/// e.g: "int x(1);" /// e.g: "int x(1);"