Commit Graph

11 Commits

Author SHA1 Message Date
Douglas Gregor 47d2859b3e Improve GCC compatibility by allowing static tentative definitions of
incomplete type (with a warning), from Enea Zaffanella!

llvm-svn: 76451
2009-07-20 18:46:59 +00:00
Daniel Dunbar c7ba533378 Add warning when a tentative array definition is assumed to have one element.
- Also, fixed one to actually be one (instead of zero). :)

llvm-svn: 69226
2009-04-15 21:35:27 +00:00
Eli Friedman 337cd3a536 PR3461: reject initializer for incomplete type. Based on patch by Tim
Northover.

llvm-svn: 68991
2009-04-13 21:28:54 +00:00
Daniel Dunbar a45cf5b6b0 Rename clang to clang-cc.
Tests and drivers updated, still need to shuffle dirs.

llvm-svn: 67602
2009-03-24 02:24:46 +00:00
Douglas Gregor 0760fa1618 Add type checking for tentative definitions at the end of the
translation unit.

Thread the various declarations of variables via
VarDecl::getPreviousDeclaration.

llvm-svn: 66601
2009-03-10 23:43:53 +00:00
Douglas Gregor 8145742349 Partial fix for PR3310, concerning type-checking for tentative
definitions. We were rejecting tentative definitions of incomplete
(which is bad), and now we don't.

This fix is partial because we don't do the end-of-translation-unit
initialization for tentative definitions that don't ever have any
initializers specified.

llvm-svn: 66584
2009-03-10 21:58:27 +00:00
Sebastian Redl 2175b6a767 Make one expected-diag directive match exactly one actual diagnostic.
This uncovers some bugs, so several test cases now fail.

llvm-svn: 64025
2009-02-07 19:52:04 +00:00
Douglas Gregor dd430f7ec9 Centralize error reporting of improper uses of incomplete types in the
new DiagnoseIncompleteType. It provides additional information about
struct/class/union/enum types when possible, either by pointing to the
forward declaration of that type or by pointing to the definition (if
we're in the process of defining that type). 
Fixes <rdar://problem/6500531>.

llvm-svn: 62521
2009-01-19 19:26:10 +00:00
Chris Lattner 3f26dc0bf6 new testcase
llvm-svn: 53071
2008-07-03 03:53:40 +00:00
Steve Naroff acb6fa6bea Sema::FinalizeDeclaratorGroup(): Tighten up the tentative definition rule when dealing with arrays.
Bug submitted by Eli.

llvm-svn: 46179
2008-01-18 20:40:52 +00:00
Steve Naroff b716fbab44 Sema::FinalizeDeclaratorGroup()...make sure we emit an diagnostic for tentative definitions with incomplete types. Touch up all test cases that are effected.
llvm-svn: 46152
2008-01-18 00:39:39 +00:00