From dbe13110f59f48b4dbb7552b3ac2935acdeece7f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 14 Apr 2012 14:01:31 +0000 Subject: Vendor import of clang trunk r154661: http://llvm.org/svn/llvm-project/cfe/trunk@r154661 --- test/CXX/temp/temp.spec/temp.explicit/p8.cpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'test/CXX/temp/temp.spec/temp.explicit/p8.cpp') diff --git a/test/CXX/temp/temp.spec/temp.explicit/p8.cpp b/test/CXX/temp/temp.spec/temp.explicit/p8.cpp index 0c5aec3b0bc8..550078ab147c 100644 --- a/test/CXX/temp/temp.spec/temp.explicit/p8.cpp +++ b/test/CXX/temp/temp.spec/temp.explicit/p8.cpp @@ -1,16 +1,15 @@ -// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s template struct X0 { struct MemberClass; - + T* f0(T* ptr); - + static T* static_member; }; -template class X0; // okay -template class X0; // okay; nothing gets instantiated. +template class X0; // ok; nothing gets instantiated. template struct X0::MemberClass { @@ -25,3 +24,17 @@ T* X0::f0(T* ptr) { template T* X0::static_member = 0; +template class X0; // ok + + +template +struct X1 { + enum class E { + e = T::error // expected-error 2{{no members}} + }; +}; +template struct X1; // expected-note {{here}} + +extern template struct X1; // ok + +template struct X1; // expected-note {{here}} -- cgit v1.3