llvm-for-llvmta/tools/clang/test/SemaCXX/complete-member-pointers.cpp

16 lines
321 B
C++
Raw Normal View History

2022-04-25 13:02:35 +02:00
// RUN: %clang_cc1 -verify -fsyntax-only -fcomplete-member-pointers %s
struct S; // expected-note {{forward declaration of 'S'}}
typedef int S::*t;
t foo; // expected-error {{member pointer has incomplete base type 'S'}}
struct S2 {
int S2::*foo;
};
int S2::*bar;
template <typename T>
struct S3 {
int T::*foo;
};