summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-12-30 04:32:02 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-12-30 04:32:02 +0000
commitcf82486c900a8dea84230543e9313bb93369b313 (patch)
treeb0bcc22c0faf40ca6edc160d4c90483ac63c2a2f /clang/lib
parent28727b81efa8442e1ee4337731874ac5f042633b (diff)
downloadbcm5719-llvm-cf82486c900a8dea84230543e9313bb93369b313.tar.gz
bcm5719-llvm-cf82486c900a8dea84230543e9313bb93369b313.zip
Remove bogus assertion and add testcase that triggers it.
llvm-svn: 290743
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaTemplateDeduction.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp
index d10b0c9a1ce..3657886b10e 100644
--- a/clang/lib/Sema/SemaTemplateDeduction.cpp
+++ b/clang/lib/Sema/SemaTemplateDeduction.cpp
@@ -380,8 +380,6 @@ static Sema::TemplateDeductionResult DeduceNonTypeTemplateArgument(
Sema &S, TemplateParameterList *TemplateParams,
NonTypeTemplateParmDecl *NTTP, Expr *Value, TemplateDeductionInfo &Info,
SmallVectorImpl<DeducedTemplateArgument> &Deduced) {
- assert((Value->isTypeDependent() || Value->isValueDependent()) &&
- "Expression template argument must be type- or value-dependent.");
return DeduceNonTypeTemplateArgument(S, TemplateParams, NTTP,
DeducedTemplateArgument(Value),
Value->getType(), Info, Deduced);
@@ -4363,6 +4361,10 @@ static bool isAtLeastAsSpecializedAs(Sema &S,
if (Deduced[ArgIdx].isNull())
break;
+ // FIXME: We fail to implement [temp.deduct.type]p1 along this path. We need
+ // to substitute the deduced arguments back into the template and check that
+ // we get the right type.
+
if (ArgIdx == NumArgs) {
// All template arguments were deduced. FT1 is at least as specialized
// as FT2.
OpenPOWER on IntegriCloud