diff options
author | Erik Verbruggen <erikjv@me.com> | 2011-10-17 09:54:52 +0000 |
---|---|---|
committer | Erik Verbruggen <erikjv@me.com> | 2011-10-17 09:54:52 +0000 |
commit | c35cba4a54106117a52b267c7040b3bea9a4d18e (patch) | |
tree | db90f3fd2cb873beb17fd289bc04931abba2d650 /lib/Parse/ParseDeclCXX.cpp | |
parent | d82e5d30930f80a92c1270e270fdb475e3718d25 (diff) |
Fixed merge-mistake where ActOnAccessSpecifier was called twice for every access specifier. The testcase has been changed to catch this too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 09f8ab2fc1..472c64b221 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -2147,11 +2147,6 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation EndLoc; if (Tok.is(tok::colon)) { EndLoc = Tok.getLocation(); - if (Actions.ActOnAccessSpecifier(AS, ASLoc, EndLoc, - AccessAttrs.getList())) { - // found another attribute than only annotations - AccessAttrs.clear(); - } ConsumeToken(); } else if (Tok.is(tok::semi)) { EndLoc = Tok.getLocation(); @@ -2163,7 +2158,13 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, Diag(EndLoc, diag::err_expected_colon) << FixItHint::CreateInsertion(EndLoc, ":"); } - Actions.ActOnAccessSpecifier(AS, ASLoc, EndLoc); + + if (Actions.ActOnAccessSpecifier(AS, ASLoc, EndLoc, + AccessAttrs.getList())) { + // found another attribute than only annotations + AccessAttrs.clear(); + } + continue; } |