summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/pointer-conversion.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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
* Changed error for nested type qualifier mismatch toFariborz Jahanian2009-11-091-3/+3
| | | | | | | warning, to match gcc. It used to be warning, so better keep it a warning (it broke a certain project). llvm-svn: 86597
* Test case for Sean Hunt's patch which I left out.Fariborz Jahanian2009-11-091-0/+10
llvm-svn: 86573
OpenPOWER on IntegriCloud