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
- 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
Remove XFAIL from 'conditional-expr-4.m' test case (which would have caught this).
Also tweaked several aspects of the test to jive with the current type checking.
llvm-svn: 77453
- Follow C99 behavior of using other operand type when one of
operands is a null pointer constant.
- Fix overenthusiastic devolving of any Objective-C types to id:
o If either operand has an Objective-C object type then:
- If both operands are interfaces and either operand can be
assigned to the other, use that type as the composite type.
- Otherwise, if either type is id, use id as the composite type.
- Otherwise, warn about incompatible types and use id as the
composite type.
- Return handling of qualified idea to separate test following
general pointer type checking.
o Upgraded from old code to allow devolving to id (without warning,
which matches GCC).
- <rdar://problem/6212771>
Add test case for issues fixed above, XFAIL though because it exposed
a new issue in property handling.
llvm-svn: 56135