1 | // RUN: %clang_cc1 -verify -fsyntax-only -fcomplete-member-pointers %s |
---|---|
2 | |
3 | struct S; // expected-note {{forward declaration of 'S'}} |
4 | typedef int S::*t; |
5 | t foo; // expected-error {{member pointer has incomplete base type 'S'}} |
6 | |
7 | struct S2 { |
8 | int S2::*foo; |
9 | }; |
10 | int S2::*bar; |
11 | |
12 | template <typename T> |
13 | struct S3 { |
14 | int T::*foo; |
15 | }; |
16 |