Support inlining base initializers. We still haven't got it completely right,
since the bindings are purged after they are set up. Need to investigate
RemoveDeadBindings algorithm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123374 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/base-init.cpp b/test/Analysis/base-init.cpp
new file mode 100644
index 0000000..e82f443
--- /dev/null
+++ b/test/Analysis/base-init.cpp
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -analyze -analyzer-check-objc-mem -analyzer-store region -analyzer-inline-call -cfg-add-initializers -verify -analyzer-no-purge-dead %s
+
+class A {
+  int x;
+public:
+  A();
+  int getx() const {
+    return x;
+  }
+};
+
+A::A() : x(0) {
+}
+
+class B : public A {
+  int y;
+public:
+  B();
+};
+
+B::B() {
+}
+
+void f() {
+  B b;
+  if (b.getx() != 0) {
+    int *p = 0;
+    *p = 0; // no-warning
+  }
+}