Chris Lattner
0369c57ac6
Make all the 'redefinition' diagnostics more consistent, and make the
...
"previously defined here" diagnostics all notes.
llvm-svn: 59920
2008-11-23 23:12:31 +00:00
Chris Lattner
66c8bebe81
remove expected-error from #if 0 section of code.
...
llvm-svn: 59772
2008-11-21 01:05:35 +00:00
Chris Lattner
b080ed504e
Fix PR2042. One remaining issue: we don't currently diagnose
...
int foobar(int);
int foobar() {}
which requires ifdef'ing out a testcase in predefined-function.c.
llvm-svn: 47236
2008-02-17 19:31:09 +00:00
Steve Naroff
17832a48f8
Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function declarations/definitions). Patch by Carl Lewis!
...
llvm-svn: 46070
2008-01-16 15:01:34 +00:00
Steve Naroff
e6b0ec8b5e
Fix Sema::ActOnDeclarator() to call MergeFunctionDecl for function decls that aren't in scope. Since C functions are in a flat namespace, we need to give them special treatment (when compared with variables and typedefs).
...
llvm-svn: 45789
2008-01-09 23:34:55 +00:00
Steve Naroff
c6edcbdb5d
Fix ASTContext::typesAreCompatible to allow for int/enum compatibility (C99 6.7.2.2p4).
...
Fix Sema::MergeFunctionDecl to allow for function type compatibility (by using the predicate on ASTContext). Function types don't have to be identical to be compatible...
llvm-svn: 45784
2008-01-09 22:43:08 +00:00
Chris Lattner
5c3f1541a7
Improve function decl merging, patch by Oliver Hunt!
...
llvm-svn: 44253
2007-11-20 19:04:50 +00:00