mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 22:08:57 -04:00

Parser::ParseDeclarationSpecifiers eagerly updates the source range of the DeclSpec with the current token position. However, it might not consume any more tokens. Fix this by only setting the start of the range, not the end. This way the SourceRange will be invalid if we don't consume any more tokens. This fixes PR20413. Differential Revision: http://reviews.llvm.org/D4646 llvm-svn: 214018
16 lines
459 B
C++
16 lines
459 B
C++
// RUN: not %clang_cc1 %s -fsyntax-only 2>&1 | FileCheck %s
|
|
|
|
// CHECK: error: expected expression
|
|
// CHECK: error: expected member name or ';' after declaration specifiers
|
|
// CHECK: error: expected '}'
|
|
// CHECK: note: to match this '{'
|
|
// CHECK: error: expected ';' after class
|
|
// CHECK: 4 errors generated.
|
|
|
|
// Do not add anything to the end of this file. This requires the whitespace
|
|
// plus EOF after the '<' token.
|
|
|
|
template <typename T>
|
|
class a {
|
|
a<
|