Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit c02dc4f

Browse files
committed
Update comment to match dr1770.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290552 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 0fa4f01 commit c02dc4f

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Diff for: lib/Sema/SemaTemplate.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -5041,14 +5041,13 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param,
50415041

50425042
if (CTAK == CTAK_Deduced &&
50435043
!Context.hasSameUnqualifiedType(ParamType, Arg->getType())) {
5044-
// C++ [temp.deduct.type]p17:
5045-
// If, in the declaration of a function template with a non-type
5046-
// template-parameter, the non-type template-parameter is used
5047-
// in an expression in the function parameter-list and, if the
5048-
// corresponding template-argument is deduced, the
5049-
// template-argument type shall match the type of the
5050-
// template-parameter exactly, except that a template-argument
5051-
// deduced from an array bound may be of any integral type.
5044+
// C++ [temp.deduct.type]p17: (DR1770)
5045+
// If P has a form that contains <i>, and if the type of i differs from
5046+
// the type of the corresponding template parameter of the template named
5047+
// by the enclosing simple-template-id, deduction fails.
5048+
//
5049+
// Note that CTAK will be CTAK_DeducedFromArrayBound if the form was [i]
5050+
// rather than <i>.
50525051
Diag(StartLoc, diag::err_deduced_non_type_template_arg_type_mismatch)
50535052
<< Arg->getType().getUnqualifiedType()
50545053
<< ParamType.getUnqualifiedType();

0 commit comments

Comments
 (0)