mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
Fix a crash-on-invalid found by -Wlogical-op-parentheses.
llvm-svn: 152559
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user