diff options
author | dim <dim@FreeBSD.org> | 2014-01-01 00:37:42 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-01-01 00:37:42 +0000 |
commit | fcddf668e724f57e5d75dc641bba534c6a21cd0d (patch) | |
tree | 6093927642346f0672b480cbc4b6c2a1b26b8a64 /lib/Parse/ParseDeclCXX.cpp | |
parent | 952eddef9aff85b1e92626e89baaf7a360e2ac85 (diff) | |
download | FreeBSD-src-fcddf668e724f57e5d75dc641bba534c6a21cd0d.zip FreeBSD-src-fcddf668e724f57e5d75dc641bba534c6a21cd0d.tar.gz |
Vendor import of clang RELEASE_34/final tag r197956 (effectively, 3.4 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_34/final@197956
Diffstat (limited to 'lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 16d06d7..dd29f99 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -1427,7 +1427,13 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind, << DeclSpec::getSpecifierName(TagType); } - SkipUntil(tok::comma, StopAtSemi); + // If we are parsing a definition and stop at a base-clause, continue on + // until the semicolon. Continuing from the comma will just trick us into + // thinking we are seeing a variable declaration. + if (TUK == Sema::TUK_Definition && Tok.is(tok::colon)) + SkipUntil(tok::semi, StopBeforeMatch); + else + SkipUntil(tok::comma, StopAtSemi); return; } |