| // RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core -analyzer-output=plist-multi-file -o %t.plist -verify -analyzer-config eagerly-assume=false %s |
| // RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/cxx-for-range.cpp.plist |
| *(volatile int *)0 = 1; // expected-warning {{Dereference of null pointer}} |
| *(volatile int *)0 = 1; // no-warning |
| MagicVector get(bool fail = false) { |
| *(volatile int *)0 = 1; // expected-warning {{Dereference of null pointer}} |
| void testLoopOpaqueCollection() { |
| *(volatile int *)0 = 1; // expected-warning {{Dereference of null pointer}} |
| *(volatile int *)0 = 1; // expected-warning {{Dereference of null pointer}} |
| bool operator==(const iterator &); |
| bool operator!=(const iterator &); |
| void testLoopOpaqueIterator() { |
| *(volatile int *)0 = 1; // expected-warning {{Dereference of null pointer}} |
| *(volatile int *)0 = 1; // expected-warning {{Dereference of null pointer}} |
| void testLoopErrorInRange() { |
| for (int y : get(true)) { // error inside get() |
| *(volatile int *)0 = 1; // no-warning |
| *(volatile int *)0 = 1; // no-warning |