1*b8c41908SRichard Smith // RUN: %clang_cc1 -std=c++2a -verify %s
2*b8c41908SRichard Smith 
3*b8c41908SRichard Smith namespace TagVs {
4*b8c41908SRichard Smith   struct Bindable { int a; };
5*b8c41908SRichard Smith   struct binding_a {}; // expected-note {{previous}}
6*b8c41908SRichard Smith   auto [binding_a] = Bindable{}; // expected-error {{redefinition}}
7*b8c41908SRichard Smith   auto [binding_b] = Bindable{}; // expected-note {{previous}}
8*b8c41908SRichard Smith   struct binding_b {}; // expected-error {{redefinition}}
9*b8c41908SRichard Smith 
10*b8c41908SRichard Smith   struct vartemplate_a {}; // expected-note {{previous}}
11*b8c41908SRichard Smith   template<typename T> int vartemplate_a; // expected-error {{redefinition}}
12*b8c41908SRichard Smith   template<typename T> int vartemplate_b; // expected-note {{previous}}
13*b8c41908SRichard Smith   struct vartemplate_b {}; // expected-error {{redefinition}}
14*b8c41908SRichard Smith 
15*b8c41908SRichard Smith   struct aliastemplate_a {}; // expected-note {{previous}}
16*b8c41908SRichard Smith   template<typename T> using aliastemplate_a = int; // expected-error {{redefinition}}
17*b8c41908SRichard Smith   template<typename T> using aliastemplate_b = int; // expected-note {{previous}}
18*b8c41908SRichard Smith   struct aliastemplate_b {}; // expected-error {{redefinition}}
19*b8c41908SRichard Smith }
20