summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/anonymous-struct-union.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve diagnostics like "initializing <type> from an expression ofDouglas Gregor2010-04-091-1/+1
| | | | | | | type..." with "initializing <type> with an expression of type...", which reads better. Thanks to John for the improved wording. llvm-svn: 100873
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>. llvm-svn: 100832
* Downgrade the "declaration does not declare anything" error to aDouglas Gregor2010-04-081-5/+5
| | | | | | | warning. It's not harmful to have such pointless declarations, and GCC does not diagnose this issue consistently. llvm-svn: 100814
* Don't a.k.a. through the primary typedef of an anonymous tag decl.John McCall2010-01-131-0/+6
| | | | llvm-svn: 93362
* 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
* Clean up some error messages with anonymous structs/unions and member ↵Douglas Gregor2009-03-061-0/+7
| | | | | | declaration parsing. Fixes PR3680 llvm-svn: 66305
* Use the 'declaration does not declare anything' error when we see an ↵Douglas Gregor2009-03-061-3/+5
| | | | | | anonymous struct/union declaration outside of a struct or union in C llvm-svn: 66303
* Add coverage of "member of anonymous union redeclares ..." diagnostic.Daniel Dunbar2009-02-271-0/+8
| | | | llvm-svn: 65637
* fix rdar://6611778, a redefinition of an interface was causing anChris Lattner2009-02-231-2/+1
| | | | | | | | assertion when the ivars and method list was reset into the existing interface. To fix this, mark decls as invalid when they are redefined, and don't insert ivars/methods into invalid decls. llvm-svn: 65340
* Implement support for anonymous structs and unions in C. Both C andDouglas Gregor2009-01-121-0/+82
C++ handle anonymous structs/unions in the same way. Addresses several bugs: <rdar://problem/6259534> <rdar://problem/6481130> <rdar://problem/6483159> The test case in PR clang/1750 now passes with -fsyntax-only, but CodeGen for inline assembler still fails. llvm-svn: 62112
OpenPOWER on IntegriCloud