]> granicus.if.org Git - clang/commitdiff
PR17730: Add test that we don't crash on this testcase. (The bug is already fixed.)
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 28 Oct 2014 17:00:19 +0000 (17:00 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 28 Oct 2014 17:00:19 +0000 (17:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220787 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaTemplate/crash.cpp [new file with mode: 0644]

diff --git a/test/SemaTemplate/crash.cpp b/test/SemaTemplate/crash.cpp
new file mode 100644 (file)
index 0000000..428e95c
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: not %clang_cc1 -verify %s -std=c++11
+
+// PR17730
+template <typename T>
+void S<T>::mem1();
+
+template <typename T>
+void S<T>::mem2() {
+    const int I = sizeof(T);
+      (void)I;
+}