]> granicus.if.org Git - clang/commit
Implement PR6423 by using one token of lookahead to disambiguate
authorChris Lattner <sabre@nondot.org>
Sun, 28 Feb 2010 18:18:36 +0000 (18:18 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 28 Feb 2010 18:18:36 +0000 (18:18 +0000)
commitb3a4e432c90be98c6d918087750397e86d030368
tree169e560fd0cef319e42fae5e336abdc8e2d707cd
parent0378bf0840335c6d56b2f1b51079522054f7da4f
Implement PR6423 by using one token of lookahead to disambiguate
an *almost* always incorrect case.  This only does the lookahead
in the insanely unlikely case, so it shouldn't impact performance.

On this testcase:

struct foo {
}
typedef int x;

Before:

t.c:3:9: error: cannot combine with previous 'struct' declaration specifier
typedef int x;
        ^

After:

t.c:2:2: error: expected ';' after struct
}
 ^
 ;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97403 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Parse/Parser.h
lib/Parse/ParseDecl.cpp
lib/Parse/ParseDeclCXX.cpp
test/Sema/declspec.c