diff options
| author | David Blaikie <dblaikie@gmail.com> | 2012-03-12 15:39:49 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2012-03-12 15:39:49 +0000 |
| commit | 9933a5abab28ee6be4c796e62e563039f39a3e57 (patch) | |
| tree | da494a2185e40f0b856d48aa7faa403fa5ab28bd /clang | |
| parent | 2f48b870f3eab9bd5e68502b21f8f716d5baf37f (diff) | |
| download | bcm5719-llvm-9933a5abab28ee6be4c796e62e563039f39a3e57.tar.gz bcm5719-llvm-9933a5abab28ee6be4c796e62e563039f39a3e57.zip | |
Fix a crash-on-invalid found by -Wlogical-op-parentheses.
llvm-svn: 152559
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 2 | ||||
| -rw-r--r-- | clang/test/Parser/cxx0x-ambig.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 979b4dd18fe..cf18a5b6294 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -1136,7 +1136,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind, else if (Tok.is(tok::l_brace) || (getLangOpts().CPlusPlus && Tok.is(tok::colon)) || (isCXX0XFinalKeyword() && - NextToken().is(tok::l_brace) || NextToken().is(tok::colon))) { + (NextToken().is(tok::l_brace) || NextToken().is(tok::colon)))) { if (DS.isFriendSpecified()) { // C++ [class.friend]p2: // A class shall not be defined in a friend declaration. diff --git a/clang/test/Parser/cxx0x-ambig.cpp b/clang/test/Parser/cxx0x-ambig.cpp index b77bae500ed..d4cbfeab75d 100644 --- a/clang/test/Parser/cxx0x-ambig.cpp +++ b/clang/test/Parser/cxx0x-ambig.cpp @@ -23,6 +23,7 @@ namespace final { }; // This too. struct T final : S {}; // expected-error {{base 'S' is marked 'final'}} + struct T bar : S {}; // expected-error {{expected ';' after top level declarator}} expected-error {{expected unqualified-id}} } } |

