clang-1/lib
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
..
AST Added Expr::EvaluateAsAnyLValue. 2010-05-14 17:07:14 +00:00
Analysis Don't add a null successor to a CFGBlock when the contents of an @synchronized statement is empty. 2010-05-13 16:38:08 +00:00
Basic Update the types for warning option subgroup arrays to 'short', we have more 2010-05-13 07:43:05 +00:00
Checker Relax an assertion. Various cases could lead to non-symbol values. 2010-05-13 08:26:32 +00:00
CodeGen Fix thinko in yesterday's fix. 2010-05-14 16:55:25 +00:00
Driver Driver: Enable -integrated-as by default, at least for Darwin/x86 without -static. 2010-05-14 02:03:00 +00:00
Frontend Revert r103770, "Added basic source locations to Elaborated and DependentName 2010-05-14 16:34:09 +00:00
Headers
Index
Lex
Parse Improve error recovery in C/ObjC when the first argument of a function 2010-05-14 17:44:56 +00:00
Rewrite
Runtime
Sema Revert r103770, "Added basic source locations to Elaborated and DependentName 2010-05-14 16:34:09 +00:00
CMakeLists.txt
Makefile