Parser support for C++ using directives, from Piotr Rak
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61486 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 3866390..ca15176 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -491,11 +491,25 @@
void CheckCXXDefaultArguments(FunctionDecl *FD);
void CheckExtraCXXDefaultArguments(Declarator &D);
+ // FIXME: NamespaceNameOnly parameter is added temporarily
+ // we will need a better way to specify lookup criteria for things
+ // like template specializations, explicit template instatatiation etc.
+
/// More parsing and symbol table subroutines...
Decl *LookupDecl(DeclarationName Name, unsigned NSI, Scope *S,
const DeclContext *LookupCtx = 0,
bool enableLazyBuiltinCreation = true,
- bool LookInParent = true);
+ bool LookInParent = true,
+ bool NamespaceNameOnly = false);
+
+ Decl *LookupNamespaceName(DeclarationName Name, Scope *S,
+ const DeclContext *LookupCtx) {
+ return LookupDecl(Name, Decl::IDNS_Tag | Decl::IDNS_Ordinary, S,
+ LookupCtx,
+ /* enableLazyBuiltinCreation */ false,
+ /* LookInParent */ true,
+ /* NamespaceNameOnly */ true);
+ }
ObjCInterfaceDecl *getObjCInterfaceDecl(IdentifierInfo *Id);
ScopedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
Scope *S);
@@ -807,6 +821,14 @@
SourceLocation LBrace);
virtual void ActOnFinishNamespaceDef(DeclTy *Dcl, SourceLocation RBrace);
+ virtual DeclTy *ActOnUsingDirective(Scope *CurScope,
+ SourceLocation UsingLoc,
+ SourceLocation NamespcLoc,
+ const CXXScopeSpec &SS,
+ SourceLocation IdentLoc,
+ IdentifierInfo *NamespcName,
+ AttributeList *AttrList);
+
/// AddCXXDirectInitializerToDecl - This action is called immediately after
/// ActOnDeclarator, when a C++ direct initializer is present.
/// e.g: "int x(1);"