[clang] add fallback to expr in the template differ when comparing ValueDecl (#93266)
This commit is contained in:
parent
b2f6d323fc
commit
ad190fcf15
@ -803,6 +803,7 @@ Miscellaneous Bug Fixes
|
||||
- Fixed an infinite recursion in ASTImporter, on return type declared inside
|
||||
body of C++11 lambda without trailing return (#GH68775).
|
||||
- Fixed declaration name source location of instantiated function definitions (GH71161).
|
||||
- Improve diagnostic output to print an expression instead of 'no argument` when comparing Values as template arguments.
|
||||
|
||||
Miscellaneous Clang Crashes Fixed
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1936,6 +1936,11 @@ class TemplateDiff {
|
||||
return;
|
||||
}
|
||||
|
||||
if (E) {
|
||||
PrintExpr(E);
|
||||
return;
|
||||
}
|
||||
|
||||
OS << "(no argument)";
|
||||
}
|
||||
|
||||
|
@ -19,10 +19,10 @@ namespace GH93068 {
|
||||
// expected-note@#A {{no known conversion from 'A<0>' to 'const A<&n[1]> &' for 1st argument}}
|
||||
// expected-note@#A {{no known conversion from 'A<0>' to 'A<&n[1]> &&' for 1st argument}}
|
||||
|
||||
// notree-error@#2 {{no viable conversion from 'A<n>' to 'A<(no argument)>'}}
|
||||
// notree-error@#2 {{no viable conversion from 'A<n>' to 'A<n + 1>'}}
|
||||
/* tree-error@#2 {{no viable conversion
|
||||
A<
|
||||
[n != (no argument)]>}}*/
|
||||
[n != n + 1]>}}*/
|
||||
|
||||
A<n + 1> v2 = A<n>(); // #2
|
||||
// expected-note@#A {{no known conversion from 'A<n>' to 'const A<&n[1]> &' for 1st argument}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user