From: Richard Smith Date: Tue, 28 Oct 2014 17:00:19 +0000 (+0000) Subject: PR17730: Add test that we don't crash on this testcase. (The bug is already fixed.) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6007a7071857b6973bfa2b5b590d53b1fb2dd9b;p=clang PR17730: Add test that we don't crash on this testcase. (The bug is already fixed.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220787 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/SemaTemplate/crash.cpp b/test/SemaTemplate/crash.cpp new file mode 100644 index 0000000000..428e95ccf9 --- /dev/null +++ b/test/SemaTemplate/crash.cpp @@ -0,0 +1,11 @@ +// RUN: not %clang_cc1 -verify %s -std=c++11 + +// PR17730 +template +void S::mem1(); + +template +void S::mem2() { + const int I = sizeof(T); + (void)I; +}