History log of /external/clang/test/Sema/incomplete-decl.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
13b21be065e9feb0759303bd51b8e8653130f0fb 27-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Factor out (some of) the checking for invalid forms of pointer
arithmetic into a couple of common routines. Use these to make the
messages more consistent in the various contexts, especially in terms of
consistently diagnosing binary operators with invalid types on both the
left- and right-hand side. Also, improve the grammar and wording of the
messages some, handling both two pointers and two (different) types.

The wording of function pointer arithmetic diagnostics still strikes me
as poorly phrased, and I worry this makes them slightly more awkward if
more consistent. I'm hoping to fix that with a follow-on patch and test
case that will also make them more helpful when a typedef or template
type parameter makes the type completely opaque.

Suggestions on better wording are very welcome, thanks to Richard Smith
for some initial help on that front.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
60c93c9981c467738369702e7aa23fd58c2b6aac 09-Feb-2010 Douglas Gregor <dgregor@apple.com> Migrate the mish-mash of declaration checks in
Sema::ActOnUninitializedDecl over to InitializationSequence (with
default initialization), eliminating redundancy. More importantly, we
now check that a const definition in C++ has an initilizer, which was
an #if 0'd code for many, many months. A few other tweaks were needed
to get everything working again:

- Fix all of the places in the testsuite where we defined const
objects without initializers (now that we diagnose this issue)
- Teach instantiation of static data members to find the previous
declaration, so that we build proper redeclaration
chains. Previously, we had the redeclaration chain but built it
too late to be useful, because...
- Teach instantiation of static data member definitions not to try
to check an initializer if a previous declaration already had an
initializer. This makes sure that we don't complain about static
const data members with in-class initializers and out-of-line
definitions.
- Move all of the incomplete-type checking logic out of
Sema::FinalizeDeclaratorGroup; it makes more sense in
ActOnUnitializedDecl.

There may still be a few places where we can improve these
diagnostics. I'll address that as a separate commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
ec8b59ffc30c65051070e6d6cbb8e4b419210d18 20-Jul-2009 Douglas Gregor <dgregor@apple.com> Improve GCC compatibility by allowing static tentative definitions of
incomplete type (with a warning), from Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
dbb4f21125699f207ce7accfc52fdd99f47ce352 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add warning when a tentative array definition is assumed to have one element.
- Also, fixed one to actually be one (instead of zero). :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
a31fecaf63dc589af70bc1604f6d2aabeb7769f7 13-Apr-2009 Eli Friedman <eli.friedman@gmail.com> PR3461: reject initializer for incomplete type. Based on patch by Tim
Northover.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
275a369f003f25bd22c00c1c0fc0251c7208caf4 11-Mar-2009 Douglas Gregor <dgregor@apple.com> Add type checking for tentative definitions at the end of the
translation unit.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
a03aca82de5259846d4ef38db11b8116398d2222 10-Mar-2009 Douglas Gregor <dgregor@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
3cb069213c8502dbb7a67860d40122d869ed8fd6 07-Feb-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make one expected-diag directive match exactly one actual diagnostic.
This uncovers some bugs, so several test cases now fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
4ec339f43c0cae2678334850c90926bea10999c7 19-Jan-2009 Douglas Gregor <dgregor@apple.com> 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>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
e60cff1089afa6368c57d716e4a295c5f1224e04 03-Jul-2008 Chris Lattner <sabre@nondot.org> new testcase


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
9a75f8ae17e7f917f491c2e8757bafbf57254c24 18-Jan-2008 Steve Naroff <snaroff@apple.com> Sema::FinalizeDeclaratorGroup(): Tighten up the tentative definition rule when dealing with arrays.

Bug submitted by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46179 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c
d3cd1e56d19474ac785e54c3915d82d2ad7f7fa9 18-Jan-2008 Steve Naroff <snaroff@apple.com> Sema::FinalizeDeclaratorGroup()...make sure we emit an diagnostic for tentative definitions with incomplete types. Touch up all test cases that are effected.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/incomplete-decl.c