// RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2a %s
;
;
;
void ;
typedef struct A; // expected-note {{type is given name 'A' for linkage purposes by this typedef declaration}}
typedef struct B; // expected-note {{type is given name 'B' for linkage purposes by this typedef declaration}}
typedef struct // expected-warning {{anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here}}
: B C; // expected-note {{type is given name 'C' for linkage purposes by this typedef declaration}}
typedef struct Lambda1; // expected-note {{type is given name 'Lambda1' for linkage purposes by this typedef declaration}}
;
typedef struct Lambda2; // expected-note {{type is given name 'Lambda2' for linkage purposes by this typedef declaration}}
typedef struct Lambda3; // expected-note {{type is given name 'Lambda3' for linkage purposes by this typedef declaration}}
typedef struct Template; // expected-note {{type is given name 'Template' for linkage purposes by this typedef declaration}}
typedef struct Nested; // expected-note {{type is given name 'Nested' for linkage purposes by this typedef declaration}}
typedef struct Friend; // expected-note {{type is given name 'Friend' for linkage purposes by this typedef declaration}}
typedef struct FriendTemplate; // expected-note {{type is given name 'FriendTemplate' for linkage purposes by this typedef declaration}}
// Check that we don't diagnose the permitted cases:
typedef struct OK;
// There are still some known permitted cases that require an early linkage
// computation. Ensure we diagnose those too.
// namespace ImplicitDecls
static_member_1;
static_member_2;
static_member_3;
// Ensure we don't compute the linkage of a member function just because it
// happens to have the same name as a builtin.