| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fixes PR16584 (radar://14415223).
llvm-svn: 186172
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
an lvalue."
The original intent of this commit was to catch potential null dereferences
early, but it breaks the common "home-grown offsetof" idiom (PR13927):
(((struct Foo *)0)->member - ((struct foo *)0))
As it turns out, this appears to be legal in C, per a footnote in
C11 6.5.3.2: "Thus, &*E is equivalent to E (even if E is a null pointer)".
In C++ this issue is still open:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#232
We'll just have to make sure we have good path notes in the future.
This reverts r164441 / 9be016dcd1ca3986873a7b66bd4bc027309ceb59.
llvm-svn: 164958
|
|
|
|
|
|
|
|
|
|
|
| |
We want to catch cases like this early, so that we can produce better
diagnostics and path notes:
Point *p = 0;
int *px = &p->x; // should warn here
*px = 1;
llvm-svn: 164441
|
|
|
|
|
|
| |
That extend a range of platforms support this test case.
llvm-svn: 157247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original commit message:
Provide -Wnull-conversion separately from -Wconversion.
Like GCC, provide a NULL conversion to non-pointer conversion as a separate
flag, on by default. GCC's flag is "conversion-null" which we provide for
cross compatibility, but in the interests of consistency (with
-Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called
-Wnull-conversion.
Patch by Lubos Lunak.
Review feedback by myself, Chandler Carruth, and Chad Rosier.
llvm-svn: 152774
|
|
|
|
|
|
|
| |
Abbreviated commit message:
Provide -Wnull-conversion separately from -Wconversion.
llvm-svn: 152765
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like GCC, provide a NULL conversion to non-pointer conversion as a separate
flag, on by default. GCC's flag is "conversion-null" which we provide for
cross compatibility, but in the interests of consistency (with
-Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called
-Wnull-conversion.
Patch by Lubos Lunak.
Review feedback by myself, Chandler Carruth, and Chad Rosier.
llvm-svn: 152745
|
|
|
|
|
|
| |
MaterializeTemporaryExpr.
llvm-svn: 152730
|
|
|
|
|
|
| |
the CFG is fully linearized.
llvm-svn: 152007
|
|
|
|
|
|
| |
because the CFG is fully linearized.
llvm-svn: 151711
|
|
|
|
|
|
| |
-std=c++0x. Patch by Ahmed Charles!
llvm-svn: 141900
|
|
|
|
| |
llvm-svn: 135294
|
|
llvm-svn: 130003
|