| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
llvm-svn: 160622
|
|
|
|
|
|
| |
conditionals. Patch by Tim Northover.
llvm-svn: 154134
|
|
|
|
|
|
| |
-Wsign-compare. Cases that previously warn on this will have a different warning emitted from -Wsign-conversion.
llvm-svn: 135664
|
|
|
|
|
|
|
|
| |
a non-pointer on the two sides of a conditional expression.
Patch by Stephen Hines and Mihai Rusu.
llvm-svn: 125995
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"bottom-up" when implicit casts and comparisons are inserted, compute them
"top-down" when the full expression is finished. Makes it easier to
coordinate warnings and thus implement -Wconversion for signedness
conversions without double-warning with -Wsign-compare. Also makes it possible
to realize that a signedness conversion is okay because the context is
performing the inverse conversion. Also simplifies some logic that was
trying to calculate the ultimate comparison/result type and getting it wrong.
Also fixes a problem with the C++ explicit casts which are often "implemented"
in the AST with a series of implicit cast expressions.
llvm-svn: 103174
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 86233
|
|
|
|
|
|
|
|
|
|
|
|
| |
DiagnoseSignCompare into Sema::CheckSignCompare and call it from more places.
Add some enumerator tests. These seem to expose some oddities in the
types we're converting C++ enumerators to; in particular, they're converting
to unsigned before int, which seems to contradict 4.5 [conv.prom] p2.
Note to self: stop baiting Doug in my commit messages.
llvm-svn: 86128
|
|
|
|
|
|
|
|
| |
error->warning.
Fixes <rdar://problem/6762239> [sema] gcc incompatibility; error on incompatible operand types in ?:.
llvm-svn: 68617
|
|
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
|
|
|
|
|
| |
types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats
llvm-svn: 51002
|
|
|
|
|
|
|
|
|
| |
tgmath.h.
Note that there is another issue with tgmath.h, so mandel.c still
doesn't work.
llvm-svn: 47069
|
|
|
|
| |
llvm-svn: 47005
|
|
|
|
| |
llvm-svn: 47003
|
|
|
|
|
|
| |
void*.
llvm-svn: 46939
|
|
|
|
| |
llvm-svn: 46577
|
|
|
|
| |
llvm-svn: 45961
|
|
|
|
|
|
|
|
| |
explicit casts.
Now, isNullPointerConstant() will return true for the following: "(void*)(double*)0"
llvm-svn: 45951
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below).
void
foo (void)
{
struct b;
struct b* x = 0;
struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type")
}
With this patch, the above is now allowed.
Bug/Patch by Eli Friedman!
llvm-svn: 45933
|
|
to precede the check for two pointer operands.
llvm-svn: 45732
|