File: p7.cpp

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (56 lines) | stat: -rw-r--r-- 1,738 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// RUN: %clang_cc1 -verify %s

// Some of the diagnostics produce 'did you mean?' suggestions. We don't care
// which ones for the purpose of this test.
// expected-note@* 0+{{here}}

struct A *f();
using Test_A = A;

void f(struct B*);
using Test_B = B;

struct C;
using Test_C = C;

struct X {
  struct D *f();
  void f(struct E*);
  struct F;
  friend struct G;
};
using Test_D = D;
using Test_XD = X::D; // expected-error {{no type named 'D' in 'X'}}
using Test_E = E;
using Test_XE = X::E; // expected-error {{no type named 'E' in 'X'}}
using Test_F = F; // expected-error {{unknown type name 'F'}}
using Test_XF = X::F;
using Test_G = G; // expected-error {{unknown type name 'G'}}
using Test_XG = X::G; // expected-error {{no type named 'G' in 'X'}}

void g() {
  {
    struct X {
      struct H *f();
      void f(struct I*);
      struct J;
      friend struct K;
    };
    using Test_H = H;
    using Test_XH = X::H; // expected-error {{no type named}}
    using Test_I = I;
    using Test_XI = X::I; // expected-error {{no type named}}
    using Test_J = J; // expected-error {{unknown type name}}
    using Test_XJ = X::J;
    using Test_K = K; // expected-error {{unknown type name}}
    using Test_XK = X::K; // expected-error {{no type named}}
  }
  using Test_H = H; // expected-error {{unknown type name}}
  using Test_I = I; // expected-error {{unknown type name}}
  using Test_J = J; // expected-error {{unknown type name}}
  using Test_K = K; // expected-error {{unknown type name}}
}
using Test_H = H; // expected-error {{unknown type name}}
using Test_I = I; // expected-error {{unknown type name}}
using Test_J = J; // expected-error {{unknown type name}}
using Test_K = K; // expected-error {{unknown type name}}