brintos

brintos / llvm-project-archived public Read only

0
0
Text · 521 B · ebdae97 Raw
17 lines · cpp
1// RUN: %clang_cc1 -verify -Wno-unused %s2 3struct A {4  int y;5};6 7struct B; // expected-note 4{{forward declaration of 'B'}}8 9void f(A *a, B *b) {10  a->B::x; // expected-error {{incomplete type 'B' named in nested name specifier}}11  a->A::x; // expected-error {{no member named 'x' in 'A'}}12  a->A::y;13  b->B::x; // expected-error {{member access into incomplete type 'B'}}14  b->A::x; // expected-error {{member access into incomplete type 'B'}}15  b->A::y; // expected-error {{member access into incomplete type 'B'}}16}17