cxx-undeclared-identifier.cpp 689 B

12345678910111213141516171819
  1. // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
  2. namespace ImplicitInt {
  3. static a(4); // expected-error {{requires a type specifier}}
  4. b(int n); // expected-error {{requires a type specifier}}
  5. c (*p)[]; // expected-error {{unknown type name 'c'}}
  6. itn f(char *p, *q); // expected-error {{unknown type name 'itn'}} expected-error {{requires a type specifier}}
  7. struct S {
  8. void f();
  9. };
  10. S::f() {} // expected-error {{requires a type specifier}}
  11. }
  12. // PR7180
  13. int f(a::b::c); // expected-error {{use of undeclared identifier 'a'}}
  14. class Foo::Bar { // expected-error {{use of undeclared identifier 'Foo'}} \
  15. // expected-error {{expected ';' after class}}