mirror of https://github.com/microsoft/clang.git
PR14549. Don't assert if we see an incomplete decltype specifier at the end of the file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f584640dc
commit
569cdc82c1
|
@ -707,8 +707,7 @@ SourceLocation Parser::ParseDecltypeSpecifier(DeclSpec &DS) {
|
|||
if (SkipUntil(tok::r_paren, /*StopAtSemi=*/true, /*DontConsume=*/true)) {
|
||||
EndLoc = ConsumeParen();
|
||||
} else {
|
||||
assert(Tok.is(tok::semi));
|
||||
if (PP.isBacktrackEnabled()) {
|
||||
if (PP.isBacktrackEnabled() && Tok.is(tok::semi)) {
|
||||
// Backtrack to get the location of the last token before the semi.
|
||||
PP.RevertCachedTokens(2);
|
||||
ConsumeToken(); // the semi.
|
||||
|
|
|
@ -4,3 +4,6 @@ decltype(;
|
|||
struct{
|
||||
a
|
||||
}
|
||||
|
||||
// PR14549. Must be at end of file.
|
||||
decltype(
|
||||
|
|
Loading…
Reference in New Issue