diff options
-rw-r--r-- | lib/AST/ASTDiagnostic.cpp | 3 | ||||
-rw-r--r-- | test/Misc/diag-template-diffing.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/AST/ASTDiagnostic.cpp b/lib/AST/ASTDiagnostic.cpp index c2c24925eb..cc1ecea9af 100644 --- a/lib/AST/ASTDiagnostic.cpp +++ b/lib/AST/ASTDiagnostic.cpp @@ -911,8 +911,7 @@ class TemplateDiff { Tree.SetNode(FromExpr, ToExpr); Tree.SetDefault(FromIter.isEnd() && FromExpr, ToIter.isEnd() && ToExpr); - if ((FromExpr && FromExpr->getType()->isIntegerType()) || - (ToExpr && ToExpr->getType()->isIntegerType())) { + if (DefaultNTTPD->getType()->isIntegralOrEnumerationType()) { if (FromExpr) FromInt = GetInt(FromIter, FromExpr); if (ToExpr) diff --git a/test/Misc/diag-template-diffing.cpp b/test/Misc/diag-template-diffing.cpp index f27f8b67e2..add96efd37 100644 --- a/test/Misc/diag-template-diffing.cpp +++ b/test/Misc/diag-template-diffing.cpp @@ -985,6 +985,11 @@ namespace VariadicDefault { // CHECK-ELIDE-NOTREE: no viable overloaded '=' // CHECK-ELIDE-NOTREE: no known conversion from 'B<(default) i1, (no argument)>' to 'B<i2, i3>' + B<i1, i2, i3> b4 = b1; + // CHECK-ELIDE-NOTREE: no viable conversion from 'B<[...], (no argument), (no argument)>' to 'B<[...], i2, i3>' + B<i2, i3> b5 = b1; + // CHECK-ELIDE-NOTREE: no viable conversion from 'B<(default) i1, (no argument)>' to 'B<i2, i3>' + C<> c1; C<void, void> c2; C<char, char> c3; |