1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
3 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
5 template <typename T
> struct S
{
10 template struct S
<int>;
21 void g(int array
[sizeof(type
)]);
24 template void f
<int>();
29 void __attribute__((used
)) foo() {
30 T
*x
= 1; // expected-error{{cannot initialize a variable of type 'int *' with an rvalue of type 'int'}}
34 foo
<int>(); // expected-note{{instantiation of}}
39 typedef void ftype(int);
49 namespace AliasTagDef
{
52 using S
= struct { // expected-warning {{add a tag name}} expected-note {{}}
53 #if __cplusplus <= 199711L
54 // expected-warning@-2 {{alias declarations are a C++11 extension}}
56 T
g() { // expected-note {{}}
67 template<typename T
> void (f
)(T t
) {}
74 namespace rdar15464547
{
79 template <typename R
> class B
{
86 extern int compile_time_assert_failed
;
90 template <typename R
> void B
<R
>::meth1() {
91 extern int compile_time_assert_failed
;
94 template <typename R
> void B
<R
>::meth2() {
95 extern int compile_time_assert_failed
;