hanchenye-llvm-project/clang/test/FixIt
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
..
fixit-at.c Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fixit-c90.c Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fixit-cxx0x.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fixit-errors-1.c Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fixit-errors.c Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fixit-objc.m Improve diagnostics when we fail to convert from a source type to a 2010-04-09 00:35:39 +00:00
fixit-pmem.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fixit.c Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fixit.cpp When a declaration of a function is missing an exception specification 2010-03-24 07:14:45 +00:00
typo-crash.m Fix a crash with ill-formed code within a method in an ill-formed 2010-02-04 23:42:48 +00:00
typo.c Whenever we emit a typo-correction diagnostic, also emit a note 2010-01-07 00:17:44 +00:00
typo.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
typo.m Fix a crash with ill-formed code within a method in an ill-formed 2010-02-04 23:42:48 +00:00