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