]> granicus.if.org Git - clang/commit
Fix PR7617 by not entering ParseFunctionDefinition when
authorChris Lattner <sabre@nondot.org>
Sun, 11 Jul 2010 22:42:07 +0000 (22:42 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 11 Jul 2010 22:42:07 +0000 (22:42 +0000)
commit004659a56916f2f81ede507c12516c146d6c0df3
treeac27fa629639189ebaf1d692618b164f210a8cf6
parentc82daefa3062721e98947e08193cd81b4e9df915
Fix PR7617 by not entering ParseFunctionDefinition when
a function prototype is followed by a declarator if we
aren't parsing a K&R style identifier list.

Also, avoid skipping randomly after a declaration if a
semicolon is missing.  Before we'd get:

t.c:3:1: error: expected function body after function declarator
void bar();
^

Now we get:

t.c:1:11: error: invalid token after top level declarator
void foo()
          ^
          ;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108105 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Parse/DeclSpec.h
include/clang/Parse/Parser.h
lib/Parse/ParseDecl.cpp
lib/Parse/ParseTemplate.cpp
lib/Parse/Parser.cpp
test/Parser/declarators.c