Handle CFGAutomaticObjDtor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119897 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/dtor.cpp b/test/Analysis/dtor.cpp
new file mode 100644
index 0000000..ea5b046
--- /dev/null
+++ b/test/Analysis/dtor.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -analyzer-inline-call -cfg-add-implicit-dtors -verify %s
+
+class A {
+public:
+ ~A() {
+ int *x = 0;
+ *x = 3; // expected-warning{{Dereference of null pointer}}
+ }
+};
+
+int main() {
+ A a;
+}