summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/merge-decls.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge function types in C.Rafael Espindola2012-11-291-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Among other differences, GCC accepts typedef int IA[]; typedef int A10[10]; static A10 *f(void); static IA *f(void); void g(void) { (void)sizeof(*f()); } but clang used to reject it with: invalid application of 'sizeof' to an incomplete type 'IA' (aka 'int []') The intention of c99's 6.2.7 seems to be that we should use the composite type and accept as gcc does. Doing the type merging required some extra fixes: * Use the type from the function type in initializations, even if an parameter is available. * Fix the merging of the noreturn attribute in function types. * Make CodeGen handle the fact that an parameter type can be different from the corresponding type in the function type. llvm-svn: 168895
* Add a testcase that r168411 would break.Rafael Espindola2012-11-271-0/+11
| | | | llvm-svn: 168669
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* testcase for rdar://6096412 which already works.Chris Lattner2009-02-111-0/+8
| | | | llvm-svn: 64289
* Handle complex types in ASTContext::mergeTypesDaniel Dunbar2009-01-281-0/+9
| | | | llvm-svn: 63238
* add test for PR2502, which was already fixed some time agoNuno Lopes2009-01-281-0/+3
| | | | llvm-svn: 63160
* Make all the 'redefinition' diagnostics more consistent, and make the Chris Lattner2008-11-231-2/+2
| | | | | | "previously defined here" diagnostics all notes. llvm-svn: 59920
* Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function ↵Steve Naroff2008-01-161-2/+2
| | | | | | declarations/definitions). Patch by Carl Lewis! llvm-svn: 46070
* Fix crasher when redefining functions. Not 100% pleased with this solution, ↵Steve Naroff2008-01-141-2/+13
| | | | | | but it is clearly an improvement. Will discuss with Chris later. llvm-svn: 45975
* improve decl merging logic to be more correct withChris Lattner2007-11-061-0/+8
functions. Patch contributed by Nuno Lopes, thanks! llvm-svn: 43757
OpenPOWER on IntegriCloud