Commit Graph

8 Commits

Author SHA1 Message Date
Eli Friedman 8f88f06dd2 Tweak wording and add diagnostic groups to misc diagnostics.
llvm-svn: 167274
2012-11-02 01:40:23 +00:00
Abramo Bagnara 5d3e724fc5 Fixed cast to union with anonymous bitfields.
llvm-svn: 115979
2010-10-07 21:20:44 +00:00
Douglas Gregor b10646d4ce 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.

llvm-svn: 100873
2010-04-09 17:53:29 +00:00
Douglas Gregor c68e140657 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>.

llvm-svn: 100832
2010-04-09 00:35:39 +00:00
Daniel Dunbar 8fbe78f6fc 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).

llvm-svn: 91446
2009-12-15 20:14:24 +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
Nuno Lopes 6be2939d5d add support for initializing static vars with a cast to union (gcc extension)
llvm-svn: 62261
2009-01-15 16:44:45 +00:00
Seo Sanghyeon 39a3ebf8f0 PR2746: Implement GCC cast to union extension
llvm-svn: 62255
2009-01-15 04:51:39 +00:00