diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-26 22:28:29 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-12-26 22:28:29 +0000 |
commit | 4f9b3f4a5bdda7e13e39d75779d50cf4e7a2e18e (patch) | |
tree | 858f8294a713a28e0d75c0dbb2038ec4c3252e94 /clang/lib | |
parent | 85f91b0ec3522bc545cbbe0d75b72256c1a8c051 (diff) | |
download | bcm5719-llvm-4f9b3f4a5bdda7e13e39d75779d50cf4e7a2e18e.tar.gz bcm5719-llvm-4f9b3f4a5bdda7e13e39d75779d50cf4e7a2e18e.zip |
Update comment to match dr1770.
llvm-svn: 290552
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 766ed944b13..87667f27ea9 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -5041,14 +5041,13 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, 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(); |