diff options
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/Sema.h | 3 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index dfd8f3461eb..6a3ed3d0b73 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/lib/Sema/Sema.h @@ -1829,7 +1829,8 @@ public: // Act on C++ namespaces virtual DeclPtrTy ActOnStartNamespaceDef(Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, - SourceLocation LBrace); + SourceLocation LBrace, + AttributeList *AttrList); virtual void ActOnFinishNamespaceDef(DeclPtrTy Dcl, SourceLocation RBrace); virtual DeclPtrTy ActOnUsingDirective(Scope *CurScope, diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 7fbbed40890..e156b62fdb8 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -2821,13 +2821,16 @@ Sema::DeclPtrTy Sema::ActOnConversionDeclarator(CXXConversionDecl *Conversion) { Sema::DeclPtrTy Sema::ActOnStartNamespaceDef(Scope *NamespcScope, SourceLocation IdentLoc, IdentifierInfo *II, - SourceLocation LBrace) { + SourceLocation LBrace, + AttributeList *AttrList) { NamespaceDecl *Namespc = NamespaceDecl::Create(Context, CurContext, IdentLoc, II); Namespc->setLBracLoc(LBrace); Scope *DeclRegionScope = NamespcScope->getParent(); + ProcessDeclAttributeList(DeclRegionScope, Namespc, AttrList); + if (II) { // C++ [namespace.def]p2: // The identifier in an original-namespace-definition shall not have been |