// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify -fblocks %s
A:: ; // expected-error {{expected unqualified-id}}
::A::ax::undef ex3; // expected-error {{'ax' is not a class, namespace, or enumeration}}
A::undef1::undef2 ex4; // expected-error {{no member named 'undef1'}}
int
static int // expected-error{{'static' can}}
int A::C::cx = 17;
static int A::C::cx2 = 17; // expected-error{{'static' can}}
;
void // expected-error{{out-of-line definition of 'm' does not match any declaration in 'C2'}}
void // expected-error{{out-of-line definition of 'f' does not match any declaration in 'C2'}}
void
void
void
A::C c1;
struct A::C c2;
;
; // expected-error {{no struct named 'undef' in namespace 'A'}}
;
;
void
// make sure the following doesn't hit any asserts
void ; // expected-error {{use of undeclared identifier 'undef'}}
typedef void ; // expected-error{{typedef declarator cannot be qualified}}
void ; // expected-error{{parameter declarator cannot be qualified}}
int A2::RC::x; // expected-error{{non-static data member defined out-of-line}}
void ; // expected-error{{out-of-line declaration of a member must be a definition}}
;
Operators
Operators
Operators::operator bool
void // expected-error-re{{out-of-line definition of 'f' does not match any declaration in namespace 'A'{{$}}}}
void // expected-error{{out-of-line definition of 'g' does not match any declaration in namespace 'A'}}
;
void // expected-error{{out-of-line definition of 'f' does not match any declaration in 'Struct'}}
void ;
void ;
// expected-warning{{extra qualification on member 'global_func2'}}
void // okay
; // expected-note{{forward declaration of 'Y'}}
Y::foo y; // expected-error{{incomplete type 'Y' named in nested name specifier}}
: // expected-error{{use of undeclared identifier 'X'}}
;
bool ;
;
// PR4452 / PR4451
foo<somens:a> a2; // expected-error {{unexpected ':' in nested name specifier}}
somens::a a3 = a2; // expected-error {{no viable conversion}}
// typedefs and using declarations.
// We still need to do lookup in the lexical scope, even if we push a
// non-lexical scope.
// PR6259, invalid case
;
;
double *dp = 0; // expected-error{{cannot initialize a variable of type 'double *' with an rvalue of type 'alias::C *'}}
// http://llvm.org/PR10109
// <rdar://problem/13853540>
;
TypedefNamespace::F::NonexistentName BadNNSWithCXXScopeSpec; // expected-error {{'TypedefNamespace::F' (aka 'int') is not a class, namespace, or enumeration}}
; // expected-note {{template is declared here}}
int issue55962 = x::a; // expected-error {{use of class template 'x' requires template arguments}} \
// expected-warning {{variable templates are a C++14 extension}}