-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure we disambiguate NTTP names when doing TemplateTree comparisons
835b99e did this when we printed the NTTPs while NOT doing a TemplateTree comparison, this does the same change for the TemplateTree mechanism as well, amking the diagnostics less confusing in these cases. Fixes: #66744
- Loading branch information
1 parent
6b8d04c
commit 6bcef54
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// RUN: %clang_cc1 -std=c++20 -verify %s -o - | ||
|
||
struct empty {}; | ||
struct metre : empty { }; | ||
struct second : empty { }; | ||
template<auto, auto> struct divided_units : empty { }; | ||
template<auto> struct quantity { }; // #QUANT | ||
|
||
void use() { | ||
quantity<divided_units<metre{}, second{}>{}> q{}; | ||
quantity<metre{}> q2 = q; | ||
// expected-error@-1 {{no viable conversion from 'quantity<divided_units<metre{}, second{}>{{}}>' to 'quantity<metre{{}}>'}} | ||
// 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}} | ||
// 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}} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters