Fix a crash when "instantiating" VarDecls that are neither type nor value dependent.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89774 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/member-templates.cpp b/test/CodeGenCXX/member-templates.cpp
index d85d639..c8494c4 100644
--- a/test/CodeGenCXX/member-templates.cpp
+++ b/test/CodeGenCXX/member-templates.cpp
@@ -18,3 +18,14 @@
// CHECK: define void @_ZN1BC1IiEET_(%struct.B* %this, i32)
// CHECK: define void @_ZN1BC2IiEET_(%struct.B* %this, i32)
template B::B(int);
+
+template<typename T>
+struct C {
+ void f() {
+ int a[] = { 1, 2, 3 };
+ }
+};
+
+void f(C<int>& c) {
+ c.f();
+}