Update comment to match dr1770.
llvm-svn: 290552
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 766ed94..87667f2 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -5041,14 +5041,13 @@
if (CTAK == CTAK_Deduced &&
!Context.hasSameUnqualifiedType(ParamType, Arg->getType())) {
- // C++ [temp.deduct.type]p17:
- // If, in the declaration of a function template with a non-type
- // template-parameter, the non-type template-parameter is used
- // in an expression in the function parameter-list and, if the
- // corresponding template-argument is deduced, the
- // template-argument type shall match the type of the
- // template-parameter exactly, except that a template-argument
- // deduced from an array bound may be of any integral type.
+ // C++ [temp.deduct.type]p17: (DR1770)
+ // If P has a form that contains <i>, and if the type of i differs from
+ // the type of the corresponding template parameter of the template named
+ // by the enclosing simple-template-id, deduction fails.
+ //
+ // Note that CTAK will be CTAK_DeducedFromArrayBound if the form was [i]
+ // rather than <i>.
Diag(StartLoc, diag::err_deduced_non_type_template_arg_type_mismatch)
<< Arg->getType().getUnqualifiedType()
<< ParamType.getUnqualifiedType();