aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.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/ParseDecl.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/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index a6e7d52fc1..7a92171908 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -471,7 +471,8 @@ void Parser::ParseSpecifierQualifierList(DeclSpec &DS) {
/// [C++] 'explicit'
///
void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
- TemplateParameterLists *TemplateParams){
+ TemplateParameterLists *TemplateParams,
+ AccessSpecifier AS){
DS.SetRangeStart(Tok.getLocation());
while (1) {
int isInvalid = false;
@@ -767,12 +768,12 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
case tok::kw_class:
case tok::kw_struct:
case tok::kw_union:
- ParseClassSpecifier(DS, TemplateParams);
+ ParseClassSpecifier(DS, TemplateParams, AS);
continue;
// enum-specifier:
case tok::kw_enum:
- ParseEnumSpecifier(DS);
+ ParseEnumSpecifier(DS, AS);
continue;
// cv-qualifier:
@@ -1228,7 +1229,7 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc,
/// [C++] elaborated-type-specifier:
/// [C++] 'enum' '::'[opt] nested-name-specifier[opt] identifier
///
-void Parser::ParseEnumSpecifier(DeclSpec &DS) {
+void Parser::ParseEnumSpecifier(DeclSpec &DS, AccessSpecifier AS) {
assert(Tok.is(tok::kw_enum) && "Not an enum specifier");
SourceLocation StartLoc = ConsumeToken();
@@ -1285,7 +1286,7 @@ void Parser::ParseEnumSpecifier(DeclSpec &DS) {
else
TK = Action::TK_Reference;
DeclTy *TagDecl = Actions.ActOnTag(CurScope, DeclSpec::TST_enum, TK, StartLoc,
- SS, Name, NameLoc, Attr);
+ SS, Name, NameLoc, Attr, AS);
if (Tok.is(tok::l_brace))
ParseEnumBody(StartLoc, TagDecl);