diff options
Diffstat (limited to 'clang/test/Analysis/nullptr.cpp')
| -rw-r--r-- | clang/test/Analysis/nullptr.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/Analysis/nullptr.cpp b/clang/test/Analysis/nullptr.cpp index fc7e7ef482b..89b4173bc56 100644 --- a/clang/test/Analysis/nullptr.cpp +++ b/clang/test/Analysis/nullptr.cpp @@ -39,7 +39,6 @@ void foo4(void) { *np = 0; // no-warning } - int pr10372(void *& x) { // GNU null is a pointer-sized integer, not a pointer. x = __null; @@ -47,3 +46,7 @@ int pr10372(void *& x) { return __null; } +void zoo1() { + char **p = 0; + delete *(p + 0); // expected-warning{{Dereference of null pointer}} +} |

