The sub-statement of a case statement is not an unevaluated context!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89303 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaTemplate/instantiate-case.cpp b/test/SemaTemplate/instantiate-case.cpp
new file mode 100644
index 0000000..bed39d7
--- /dev/null
+++ b/test/SemaTemplate/instantiate-case.cpp
@@ -0,0 +1,21 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+
+template<class T>
+static int alpha(T c)
+{
+ return *c; // expected-error{{indirection requires pointer operand}}
+}
+
+template<class T>
+static void
+_shexp_match()
+{
+ switch(1) {
+ case 1:
+ alpha(1); // expected-note{{instantiation of function template}}
+ }
+}
+int main() {
+ _shexp_match<char>(); // expected-note{{instantiation of function template}}
+ return 0;
+}