2010-05-15 05:35:02 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
|
|
|
|
|
2012-05-16 05:01:51 +08:00
|
|
|
namespace ImplicitInt {
|
|
|
|
static a(4); // expected-error {{requires a type specifier}}
|
|
|
|
b(int n); // expected-error {{requires a type specifier}}
|
|
|
|
c (*p)[]; // expected-error {{unknown type name 'c'}}
|
|
|
|
itn f(char *p, *q); // expected-error {{unknown type name 'itn'}} expected-error {{requires a type specifier}}
|
|
|
|
|
|
|
|
struct S {
|
|
|
|
void f();
|
|
|
|
};
|
|
|
|
S::f() {} // expected-error {{requires a type specifier}}
|
|
|
|
}
|
|
|
|
|
2010-06-22 19:30:04 +08:00
|
|
|
// PR7180
|
|
|
|
int f(a::b::c); // expected-error {{use of undeclared identifier 'a'}}
|
|
|
|
|
2010-05-15 05:35:02 +08:00
|
|
|
class Foo::Bar { // expected-error {{use of undeclared identifier 'Foo'}} \
|
|
|
|
// expected-error {{expected ';' after class}}
|