[analyzer] Even if we are not inlining a virtual call, still invalidate!

Fixes a mistake introduced in r161916.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161987 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/inline.cpp b/test/Analysis/inline.cpp
index 4eaed9f..6b9a885 100644
--- a/test/Analysis/inline.cpp
+++ b/test/Analysis/inline.cpp
@@ -166,3 +166,30 @@
     x.interface();
   }
 }
+
+namespace Invalidation {
+  struct X {
+    void touch(int &x) const {
+      x = 0;
+    }
+
+    void touch2(int &x) const;
+
+    virtual void touchV(int &x) const {
+      x = 0;
+    }
+
+    virtual void touchV2(int &x) const;
+
+    int test() const {
+      // We were accidentally not invalidating under -analyzer-ipa=inlining
+      // at one point for virtual methods with visible definitions.
+      int a, b, c, d;
+      touch(a);
+      touch2(b);
+      touchV(c);
+      touchV2(d);
+      return a + b + c + d; // no-warning
+    }
+  };
+}