summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/nullptr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Treat nullPtrType as a location type.Anna Zaks2013-07-121-0/+6
| | | | | | Fixes PR16584 (radar://14415223). llvm-svn: 186172
* Revert "[analyzer] Check that a member expr is valid even when the result is ↵Jordan Rose2012-10-011-5/+4
| | | | | | | | | | | | | | | | | | | | 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
* [analyzer] Check that a member expr is valid even when the result is an lvalue.Jordan Rose2012-09-221-4/+5
| | | | | | | | | | | 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
* Replace inline asm constraint "=a" by the more general constraint "=r".Simon Atanasyan2012-05-221-1/+1
| | | | | | That extend a range of platforms support this test case. llvm-svn: 157247
* Reapply r152745 (reverted in 152765) now that compiler-rt is fixed.David Blaikie2012-03-151-1/+1
| | | | | | | | | | | | | | | | | 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
* Revert r152745 as it's breaking the internal buildbots.Chad Rosier2012-03-151-1/+1
| | | | | | | Abbreviated commit message: Provide -Wnull-conversion separately from -Wconversion. llvm-svn: 152765
* Provide -Wnull-conversion separately from -Wconversion.David Blaikie2012-03-141-1/+1
| | | | | | | | | | | | | 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
* [Analyser] Remove unnecessary recursive visits for ExprWithCleanups andErik Verbruggen2012-03-141-0/+22
| | | | | | MaterializeTemporaryExpr. llvm-svn: 152730
* Remove a recursive visitation in ExprEngine that is no longer needed because ↵Erik Verbruggen2012-03-041-0/+9
| | | | | | the CFG is fully linearized. llvm-svn: 152007
* Remove a recursive visitiation in ExprEngine that is no longer neededErik Verbruggen2012-02-291-1/+4
| | | | | | because the CFG is fully linearized. llvm-svn: 151711
* Update all tests other than Driver/std.cpp to use -std=c++11 rather thanRichard Smith2011-10-131-1/+1
| | | | | | -std=c++0x. Patch by Ahmed Charles! llvm-svn: 141900
* [analyzer] GNU __null is a pointer-sized integer, not a pointer. Fixes PR10372.Jordy Rose2011-07-151-0/+8
| | | | llvm-svn: 135294
* Add static analyzer support for C++'0X nullptr. Patch by Jim Goodnow II.Ted Kremenek2011-04-221-0/+41
llvm-svn: 130003
OpenPOWER on IntegriCloud