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 namespace A
{ // expected-note 2 {{previous definition is here}}
10 void f() { A
= 0; } // expected-error {{unexpected namespace name 'A': expected expression}}
11 int A
; // expected-error {{redefinition of 'A' as different kind of symbol}}
12 class A
; // expected-error {{redefinition of 'A' as different kind of symbol}}
14 class B
{}; // expected-note {{previous definition is here}}
15 // expected-note@-1 {{candidate function (the implicit copy assignment operator) not viable}}
16 #if __cplusplus >= 201103L // C++11 or later
17 // expected-note@-3 {{candidate function (the implicit move assignment operator) not viable}}
20 void C(); // expected-note {{previous definition is here}}
21 namespace C
{} // expected-error {{redefinition of 'C' as different kind of symbol}}
47 x
= 0; // expected-error {{no viable overloaded '='}}
65 namespace B
{} // expected-error {{redefinition of 'B' as different kind of symbol}}
74 static foo::x test1
; // ok
76 static foo::X test2
; // typo: expected-error {{no type named 'X' in}}
84 extern op::greater
const greater
;
90 op::greater
const greater
= op::greater();
93 template<typename T
, typename U
>
95 { numeric::greater(l
, r
); }