Fariborz Jahanian | 4fb2053 | 2010-05-14 21:35:02 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s |
| 2 | |
Richard Smith | 827adaf | 2012-05-15 21:01:51 +0000 | [diff] [blame] | 3 | namespace ImplicitInt { |
| 4 | static a(4); // expected-error {{requires a type specifier}} |
| 5 | b(int n); // expected-error {{requires a type specifier}} |
| 6 | c (*p)[]; // expected-error {{unknown type name 'c'}} |
| 7 | itn f(char *p, *q); // expected-error {{unknown type name 'itn'}} expected-error {{requires a type specifier}} |
| 8 | |
| 9 | struct S { |
| 10 | void f(); |
| 11 | }; |
| 12 | S::f() {} // expected-error {{requires a type specifier}} |
| 13 | } |
| 14 | |
Argyrios Kyrtzidis | 661c36b | 2010-06-22 11:30:04 +0000 | [diff] [blame] | 15 | // PR7180 |
| 16 | int f(a::b::c); // expected-error {{use of undeclared identifier 'a'}} |
| 17 | |
Fariborz Jahanian | 4fb2053 | 2010-05-14 21:35:02 +0000 | [diff] [blame] | 18 | class Foo::Bar { // expected-error {{use of undeclared identifier 'Foo'}} \ |
| 19 | // expected-note {{to match this '{'}} \ |
| 20 | // expected-error {{expected ';' after class}} |
| 21 | // expected-error {{expected '}'}} |