aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDeclCXX.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-25 22:00:53 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-25 22:00:53 +0000
commit06c0fecd197fef21e265a41bca8dc5022de1f864 (patch)
treed0168c6425752edf087f70516c6025496252edb8 /lib/Parse/ParseDeclCXX.cpp
parentd048bb79f5c3b3751878aec038bce28a5ce0f439 (diff)
Pass access specifiers through to member classes and member enums.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67710 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r--lib/Parse/ParseDeclCXX.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp
index d2d8c1eeae..1bbf411874 100644
--- a/lib/Parse/ParseDeclCXX.cpp
+++ b/lib/Parse/ParseDeclCXX.cpp
@@ -349,7 +349,8 @@ Parser::TypeTy *Parser::ParseClassName(SourceLocation &EndLocation,
/// 'struct'
/// 'union'
void Parser::ParseClassSpecifier(DeclSpec &DS,
- TemplateParameterLists *TemplateParams) {
+ TemplateParameterLists *TemplateParams,
+ AccessSpecifier AS) {
assert((Tok.is(tok::kw_class) ||
Tok.is(tok::kw_struct) ||
Tok.is(tok::kw_union)) &&
@@ -462,7 +463,7 @@ void Parser::ParseClassSpecifier(DeclSpec &DS,
TemplateParams->size()));
else
TagOrTempResult = Actions.ActOnTag(CurScope, TagType, TK, StartLoc, SS, Name,
- NameLoc, Attr);
+ NameLoc, Attr, AS);
// Parse the optional base clause (C++ only).
if (getLang().CPlusPlus && Tok.is(tok::colon))
@@ -649,7 +650,7 @@ Parser::DeclTy *Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS) {
// decl-specifier-seq:
// Parse the common declaration-specifiers piece.
DeclSpec DS;
- ParseDeclarationSpecifiers(DS);
+ ParseDeclarationSpecifiers(DS, 0, AS);
if (Tok.is(tok::semi)) {
ConsumeToken();