History log of /external/clang/test/Sema/array-init.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/test/Sema/array-init.c
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/test/Sema/array-init.c
122e601886ae527d6e7100c589339c05190a168a 08-Jun-2013 Serge Pavlov <sepavloff@gmail.com> Recognition of empty structures and unions is moved to semantic stage

Differential Revision: http://llvm-reviews.chandlerc.com/D586


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
27f9cf3a5a92f70f043b6cfbc5f3f2ac3a38f182 06-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix assert if __extension__ or _Generic is used when initializing a char array from a string literal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
561e3c68864d11f39a07a6d1711ce08d2739a263 20-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13881: Add -Wzero-length-array for zero length array extension, and move it into -Wgnu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
b774d73540ba62a5e6a8e9217b320b27a946cfad 12-Sep-2012 NAKAMURA Takumi <geek4civic@gmail.com> clang/test: [PR8833] Introduce the feature "LP64" to suppress LLP64-incompatible tests.

I think some of them could be rewritten to fit also LLP64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
be0ee875d8a91c031a085cbbd73ad9e8dc1aa8ff 15-May-2012 David Blaikie <dblaikie@gmail.com> Improve some of the conversion warnings to fire on conversion to bool.

Moves the bool bail-out down a little in SemaChecking - so now
-Wnull-conversion and -Wliteral-conversion can fire when the target type is
bool.

Also improve the wording/details in the -Wliteral-conversion warning to match
the -Wconstant-conversion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
e31b8fb25b458f00e31dcd657c0840e5238e0f05 05-Apr-2012 David Blaikie <dblaikie@gmail.com> Enable warn_impcast_literal_float_to_integer by default.

This diagnostic seems to be production ready, it's just an oversight that it
wasn't turned on by default.

The test changes are a bit of a mixed bag. Some tests that seemed like they
clearly didn't need to use this behavior have been modified not to use it.
Others that I couldn't be sure about, I added the necessary expected-warnings
to.

It's possible the diagnostic message could be improved to make it clearer that
this warning can be suppressed by using a value that won't lose precision when
converted to the target type (but can still be a floating point literal, such
as "bool b = 1.0;").

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
acbabf177079ed41c055b1484465082f9f1d3d06 03-Feb-2012 Hans Wennborg <hans@hanshq.net> Don't warn about anonymous struct/union in C11.

Also, in C, call this a C11 extension rather than a GNU extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
73076431605556fdbf28d287d084a73a24a8b8d4 05-Jan-2012 John McCall <rjmccall@apple.com> The value of a const weak variable is not an integer constant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
d7c56e1114bfe7d461786903bb720d2c6efc05a1 29-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Change the diagnostics which said 'accepted as an extension' to instead say
'is an extension'. The former is inappropriate and confusing when building with
-Werror/-pedantic-errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
0c706c29f20b6fa36759fa41333b9c3ec0bd2969 20-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Add list initialization for complex numbers in C. Essentially, this allows "_Complex float x = {1.0f, 2.0f};". See changes to docs/LanguageExtensions.html for a longer description.

<rdar://problem/9397672>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140090 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
cd9ec3b4fb3d042f89aa5b572de7df3ef9ee4a80 22-Feb-2011 Douglas Gregor <dgregor@apple.com> Implement the GNU C extension which permits the initialization of an
array from a constant array compound literal. Fixes PR9261.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
09865a903affa9c08687859d8de65470064c7bc2 14-Aug-2010 Eli Friedman <eli.friedman@gmail.com> PR3344: Downgrade "too many braces around scalar initializer" to a warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
0333296d142d45bf2723635848928815b7491f91 29-Jul-2010 Douglas Gregor <dgregor@apple.com> Reword the empty struct/union warning in C to note that such structs and unions have size 0 in C, size 1 in C++. Put this warning under -Wc++-compat.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
08a41901e18aeb91b87d031b93df70374af02564 09-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics like "initializing <type> from an expression of
type..." with "initializing <type> with an expression of type...",
which reads better. Thanks to John for the improved wording.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
d4eea8362605807327735727a9098abe1eb23b19 09-Apr-2010 Douglas Gregor <dgregor@apple.com> Improve diagnostics when we fail to convert from a source type to a
destination type for initialization, assignment, parameter-passing,
etc. The main issue fixed here is that we used rather confusing
wording for diagnostics such as

t.c:2:9: warning: initializing 'char const [2]' discards qualifiers,
expected 'char *' [-pedantic]
char *name = __func__;
^ ~~~~~~~~

We're not initializing a 'char const [2]', we're initializing a 'char
*' with an expression of type 'char const [2]'. Similar problems
existed for other diagnostics in this area, so I've normalized them all
with more precise descriptive text to say what we're
initializing/converting/assigning/etc. from and to. The warning for
the code above is now:

t.c:2:9: warning: initializing 'char *' from an expression of type
'char const [2]' discards qualifiers [-pedantic]
char *name = __func__;
^ ~~~~~~~~

Fixes <rdar://problem/7447179>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
cfdc81a83467973b14e4ea5e9e9af1690f135415 19-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Initialization improvements: addition of string initialization and a few
small bug fixes in SemaInit, switch over SemaDecl to use it more often, and
change a bunch of diagnostics which are different with the new initialization
code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.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/array-init.c
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
d1969d803cfcc65f1c334df4cc89c7fdd33ee4c9 22-Jul-2009 Mike Stump <mrs@apple.com> Prep for new warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
e540858b289b23653bcb23646f135729203635cb 29-May-2009 Eli Friedman <eli.friedman@gmail.com> Make sure we don't give the wrong warning, and make sure not to set
hadError (suppressing future diagnostics) if we didn't print an
error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
759f25237864f3a3cc23eb01f0c0ce6edcc9342d 16-May-2009 Eli Friedman <eli.friedman@gmail.com> PR3009: Get rid of bogus warning for scalar compound literals.

This patch isn't quite ideal in that it eliminates the warning for
constructs like "int a = {1};", where the braces are in fact redundant.
However, that would have required a bunch of refactoring, and it's
much less likely to cause confusion compared to redundant nested braces.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.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/array-init.c
a6457963cf7ffe71498c408dd590d9d1acb9513c 20-Mar-2009 Douglas Gregor <dgregor@apple.com> Allow flexible array initializers that are not surrounded by
braces. We now build the appropriate fully-structured initializer list
for such things. Per PR3618, verified that we're getting the right
code generation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
7c53ca6e03833adab4465462b7d5c888741b715d 18-Feb-2009 Douglas Gregor <dgregor@apple.com> Downgrade the "excess elements in initializer" errors to warnings *in
C*. They're required errors in C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
eeb15d499f032bb89773ddaca2d17475122a37bb 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Implement semantic analysis for the GNU flexible array initialization
extension. The interaction with designated initializers is a
bit... interesting... but we follow GNU's lead and don't permit too
much crazy code in this area.

Also, make the "excess initializers" error message a bit more
informative.

Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
b574e5630d66629ccc8f2432e60b59ae42f1f363 30-Jan-2009 Douglas Gregor <dgregor@apple.com> Upgrade the "excess elements in array initializer" warning to an
error, since both C99 and C++ consider it an error. For reference, GCC
makes this a warning while G++ makes it an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
4c67834407ca6ab344dcf44fc599ad4938cfa96d 28-Jan-2009 Douglas Gregor <dgregor@apple.com> Code generation support for C99 designated initializers.

The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.

Known limitations:
- Designating a member of a union that isn't the first member may
result in bogus initialization (we warn about this)
- GNU array-range designators are not supported (we warn about this)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
1367eded0ded01eacfdeaa92670d75ef8816d4d3 12-Nov-2008 Sebastian Redl <sebastian.redl@getdesigned.at> 64-bit test fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
62b6a65f0bef3ada0d8bac1a98f7e0769e6e8ffb 02-Sep-2008 Nuno Lopes <nunoplopes@sapo.pt> readd test as it passes correctly. nice, but weird

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
6d4abe1eee550411524ca002025fdf0490eefd26 02-Sep-2008 Eli Friedman <eli.friedman@gmail.com> Backing out r55607 due to logic errors and test regression.

I'll try to come up with a correct fix for the testcase sometime soon.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
73419bf6cbf8e5f7a0f9b8855d6531db264ae899 01-Sep-2008 Nuno Lopes <nunoplopes@sapo.pt> fix one more this-is-not-a-constant error. test included

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
f7e37ce8400d5ba3b0613116034aaa30e6a70b3e 01-Sep-2008 Nuno Lopes <nunoplopes@sapo.pt> make CheckArithmeticConstantExpression() aware of &foo and pointers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
396f0bfd4b2189452914893ce69f5fb068d0ec22 18-Aug-2008 Daniel Dunbar <daniel@zuster.org> Support initialization of incomplete array with zero size (as
extension).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
d8803632d248a360a040ff03eff1162988058036 10-Aug-2008 Chris Lattner <sabre@nondot.org> wrap some long diagnostics, make 'initializer is not a constant' diagnostic
a bit more clear (rdar://5646070)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
f84eda37251c679e2f20343c47a4a3586d9a8e21 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Count the number of initializable members correctly in structs/unions
with unnamed members.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
402256fc665ba179873ffcb4d630e28cbea42f27 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Diagnose implicit init list for empty aggregate, like struct {}. Fixes
PR2151 (by not creating the empty implicit init list).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
638e14413a4557c399fa2b7da2be5e4e9c1330a2 25-May-2008 Eli Friedman <eli.friedman@gmail.com> Move the error checking for variable-sized objects so we don't
double-report errors; fixes PR2362.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
c56c977f44d0bd8422a6f0fe87f361cbb728c06b 19-May-2008 Eli Friedman <eli.friedman@gmail.com> Switch on SemaInit; this makes some code in SemaDecl dead, but I'll give
it a few days to make sure there aren't any significant regressions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51273 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
fd89bc825026e44c68a68db72d4012fd6752e70f 02-Apr-2008 Chris Lattner <sabre@nondot.org> Fix PR2017 and silence some bogus errors.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49068 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
a7ad98ff0919d6a24ea7c46634ea29bea551c1a0 11-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1992 by computing the right type for string literals, which
is an array type not a pointer type. This requires updating some
diags that change and updating the code generator to handle the
proper form of strings.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46941 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
578edc6614236b224f63ac707acecaeb2a74d6b4 28-Jan-2008 Steve Naroff <snaroff@apple.com> Fix a bug with struct initializers (in Sema::CheckInitializerListTypes()).
Test case included from bz1948 (thanks Neil!).
Also fixed an 80 column violation...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
a99603333fffb57cf9ac37eabb190c8f5afc914b 25-Jan-2008 Steve Naroff <snaroff@apple.com> Replace Sema::CheckVariableInitList, CheckConstantInitList, and CheckForCharArrayInitializer with CheckInitializerListTypes. The new routine now supports struct/union initializers.

This is a modified version of a patch by Eli Friedman. This version passes all of the clang tests and supports vectors:-)

Note that Eli and I are still unsatisfied the implementation of CheckInitializerListTypes(). We'd like to find a more elegant implementation. Nevertheless, this is a complex part of the standard (and may be hard to simplify). Since the complexity is localized to this routine, we can iterate without too much disruption:-)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
ca107309ffbcacae31d1685ab133f75ca0d7271a 22-Jan-2008 Steve Naroff <snaroff@apple.com> Sema::CheckInitializerTypes(). Start simpliying and cleaning up...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
b7b61159325e002998ff950fdc70a6425a6b13b3 04-Jan-2008 Chris Lattner <sabre@nondot.org> add comments for the various AssignConvertType's, and split int->pointer from pointer->int.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
5cf216b7fa64b933b60743b0b26053e8e7aa87be 04-Jan-2008 Chris Lattner <sabre@nondot.org> Merge all the 'assignment' diagnostic code into one routine, decloning
it from several places. This merges the diagnostics, making them more
uniform and fewer in number. This also simplifies and cleans up the code.

Some highlights:
1. This removes a bunch of very-similar diagnostics.
2. This renames AssignmentCheckResult -> AssignConvertType
3. This merges PointerFromInt + IntFromPointer which were always treated the same.
4. This updates a bunch of test cases that have minor changes to the produced diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
2fdc3749097a581567dbd9fe66c48c0458bd3e34 10-Dec-2007 Steve Naroff <snaroff@apple.com> Add support for initializing char arrays from string literals.

Adapted from a patch by Anders Carlsson.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
fd8b4a4b29a2b9d662d0c9a92c1eebd83160b10b 18-Oct-2007 Steve Naroff <snaroff@apple.com> Fix the following bug...

unsigned char asso_values[] = { 34 };
int legal2() {
return asso_values[0];
}

The code that creates the new constant array type was operating on the original type.

As a result, the constant type being generated was "unsigned char [1][]" (which is wrong).

The fix is to operate on the element type - in this case, the correct type is "unsigned char [1]"

I added this case to array-init.c, which clearly didn't catch this bogosity...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
3b427b3ba518f7a7293458c2d3d92eebd8458d87 11-Oct-2007 Chris Lattner <sabre@nondot.org> rename -parse-ast-print to -ast-print
rename -parse-ast-dump to -ast-dump
remove -parse-ast, which is redundant with -fsyntax-only



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
9f3d942e9970bc8f51add390b2a2c46b5a2ab747 26-Sep-2007 Ted Kremenek <kremenek@apple.com> Removed option "-parse-ast-check" from clang driver. This is now implemented
using "-parse-ast -verify".

Updated all test cases (using a sed script) that invoked -parse-ast-check to
now use -parse-ast -verify.

Fixed a bug where using "-verify" instead of "-parse-ast-check" would not
correctly create the DiagClient needed to accumulate diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
410e3e206b50e0336bd294fa5fb8dfcca3ee1af5 12-Sep-2007 Steve Naroff <snaroff@apple.com> Remove a FIXME. Replace a couple asserts with an appropriate error
diagnostic for illegal initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
371227d6dc3cf89a3165d592cd9a4cbb400ec45c 04-Sep-2007 Steve Naroff <snaroff@apple.com> More fun with initializers!

- Fixed many bugs, enhanced test case considerably, added a diagnostic, etc.
- Refactored CheckInitList() into CheckVariableInitList()/CheckConstantInitList().
- Added CheckInitExpr().
- Support for multi-dimensional arrays looking good.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
d35005ece906cca5238d75b031b8db7eac0ac6e1 03-Sep-2007 Steve Naroff <snaroff@apple.com> Finish getting "array-init.c" to work properly.

Array scalar initialization is now is reasonable shape.

Next step, structure and array of structure initializers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
38374b05791ee93300b9fbe8ceb3957f54184b37 02-Sep-2007 Steve Naroff <snaroff@apple.com> More progress on array initializers.

- Added Expr::isConstantExpr().
- Added type checking for InitListExpr elements.
- Added diagnostic for trying to initialize a variable sized object.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
6f9f307d527e3451470dd07ae932475f26c6de6e 02-Sep-2007 Steve Naroff <snaroff@apple.com> More semantic analysis of initializers.

Added 2 errors and one warning, updated test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/array-init.c
f009063ab7e05be7781751ff9e4b42630f07a747 02-Sep-2007 Steve Naroff <snaroff@apple.com> Start implementing semantic analysis for C initializers.

Step 1: Start instantiating InitListExpr's.
Step 2: Call newly added function Sema::CheckInitializer() from Sema::ParseDeclarator().
Step 3: Give InitListExpr's a preliminary type.
Step 4: Start emitting diagnostics for simple assignments.

Note:

As a result of step 1, the CodeGen/mandel.c test asserts "Unimplemented agg expr!", which is expected.

As a result of step 4, the test below now fails. This isn't expected and needs to be investigated (it appears type checking for C++ references is flawed in some way).

******************** TEST 'Sema/cxx-references.cpp' FAILED! ********************
Command:
clang -fsyntax-only Sema/cxx-references.cpp
Output:
Sema/cxx-references.cpp:8:12: warning: incompatible pointer types assigning 'int &*' to 'int *'
int *p = &r;
^~
Sema/cxx-references.cpp:10:20: error: incompatible types assigning 'int (int)' to 'int (&)(int)'
int (&rg)(int) = g;
^
Sema/cxx-references.cpp:13:18: error: incompatible types assigning 'int [3]' to 'int (&)[3]'
int (&ra)[3] = a;
^
Sema/cxx-references.cpp:16:14: error: incompatible types assigning 'int *' to 'int *&'
int *& P = Q;
^
4 diagnostics generated.
******************** TEST 'Sema/cxx-references.cpp' FAILED! ********************




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