Files
clang-p2996/clang/test/CXX/basic/basic.scope/basic.scope.declarative/p4.cpp
Richard Smith b8c419085f Add IDNS_Tag to C++ declarations that conflict with tag declarations.
Fixes some accepts-invalids with tags and other declarations declared in the
same scope.

llvm-svn: 312743
2017-09-07 20:22:00 +00:00

20 lines
896 B
C++

// RUN: %clang_cc1 -std=c++2a -verify %s
namespace TagVs {
struct Bindable { int a; };
struct binding_a {}; // expected-note {{previous}}
auto [binding_a] = Bindable{}; // expected-error {{redefinition}}
auto [binding_b] = Bindable{}; // expected-note {{previous}}
struct binding_b {}; // expected-error {{redefinition}}
struct vartemplate_a {}; // expected-note {{previous}}
template<typename T> int vartemplate_a; // expected-error {{redefinition}}
template<typename T> int vartemplate_b; // expected-note {{previous}}
struct vartemplate_b {}; // expected-error {{redefinition}}
struct aliastemplate_a {}; // expected-note {{previous}}
template<typename T> using aliastemplate_a = int; // expected-error {{redefinition}}
template<typename T> using aliastemplate_b = int; // expected-note {{previous}}
struct aliastemplate_b {}; // expected-error {{redefinition}}
}