clang-1/lib/Parse
Chris Lattner 9a65b81105 Improve error recovery in C/ObjC when the first argument of a function
declarator is incorrect.  Not being a typename causes the parser to 
dive down into the K&R identifier list handling stuff, which is almost
never the right thing to do.

Before:

r.c:3:17: error: expected ')'
void bar(intptr y);
                ^
r.c:3:9: note: to match this '('
void bar(intptr y);
        ^
r.c:3:10: error: a parameter list without types is only allowed in a function definition
void bar(intptr y);
         ^

After:

r.c:3:10: error: unknown type name 'intptr'; did you mean 'intptr_t'?
void bar(intptr y);
         ^~~~~~
         intptr_t
r.c:1:13: note: 'intptr_t' declared here
typedef int intptr_t;
            ^

This fixes rdar://7980651 - poor recovery for bad type in the first arg of a C function



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103783 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-14 17:44:56 +00:00
..
AttributeList.cpp Add calling convention related attributes to related declaration. Mark attributes invalid on type related checking so to add them to declarations only when everything is ok. 2010-04-30 13:10:51 +00:00
CMakeLists.txt
DeclSpec.cpp Keep track of the actual storage specifier written on a variable or 2010-04-19 22:54:31 +00:00
Makefile
MinimalAction.cpp Migrate the responsibility for turning the receiver name in an 2010-04-21 20:38:13 +00:00
ParseCXXInlineMethods.cpp Make Parser::ConsumeAndStoreUntil() more consistent with Parser::SkipUntil(). 2010-04-23 21:20:12 +00:00
ParseDecl.cpp Improve error recovery in C/ObjC when the first argument of a function 2010-05-14 17:44:56 +00:00
ParseDeclCXX.cpp Namespaces can only be defined at global or namespace scope. Fixes PR6596. 2010-05-14 05:08:22 +00:00
ParseExpr.cpp When parsing a cast-expression that starts with a scope annotation, 2010-04-23 02:08:13 +00:00
ParseExprCXX.cpp Rework our handling of temporary objects within the conditions of 2010-05-06 17:25:47 +00:00
ParseInit.cpp Implement parsing for message sends in Objective-C++. Message sends in 2010-04-21 22:36:40 +00:00
ParseObjc.cpp This patch deals with Sema Part of Setter/Getter synthesis 2010-05-05 21:52:17 +00:00
ParsePragma.cpp
ParsePragma.h
ParseStmt.cpp Fixed DISABLE_SMART_POINTERS breakage 2010-05-06 21:39:56 +00:00
ParseTemplate.cpp
ParseTentative.cpp Fix a tentative-parse error with unqualified template ids in cast expressions. 2010-04-30 03:11:01 +00:00
Parser.cpp Diagnose misordered initializers in constructor templates immediately instead of 2010-04-10 07:37:23 +00:00
RAIIObjectsForParser.h