Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / AST / ast-nttp-template-tree-compares.cpp
bloba767e385b8f0abc11589ae730e87e20710466c5d
1 // RUN: %clang_cc1 -std=c++20 -verify %s -o -
3 struct empty {};
4 struct metre : empty { };
5 struct second : empty { };
6 template<auto, auto> struct divided_units : empty { };
7 template<auto> struct quantity { }; // #QUANT
9 void use() {
10 quantity<divided_units<metre{}, second{}>{}> q{};
11 quantity<metre{}> q2 = q;
12 // expected-error@-1 {{no viable conversion from 'quantity<divided_units<metre{}, second{}>{{}}>' to 'quantity<metre{{}}>'}}
13 // expected-note@#QUANT {{candidate constructor (the implicit copy constructor) not viable: no known conversion from 'quantity<divided_units<metre{}, second{}>{}>' to 'const quantity<metre{{}}> &' for 1st argument}}
14 // expected-note@#QUANT {{candidate constructor (the implicit move constructor) not viable: no known conversion from 'quantity<divided_units<metre{}, second{}>{}>' to 'quantity<metre{{}}> &&' for 1st argument}}