summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-10-03 18:24:40 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-10-03 18:24:40 +0000
commit8d2eaf9239fb29a06bf9b12658b0a4192062fabe (patch)
tree225c4ab0cb9387baf6626b3bf6b170dbce21d53b /clang/lib/Sema/SemaTemplate.cpp
parent6fb03a290b277a74e91715e8c379b232558b39b1 (diff)
downloadbcm5719-llvm-8d2eaf9239fb29a06bf9b12658b0a4192062fabe.tar.gz
bcm5719-llvm-8d2eaf9239fb29a06bf9b12658b0a4192062fabe.zip
PR43547: substitute into the type of a non-type template parameter if
it's instantiation-dependent, even if it's not dependent. There might be a SFINAE check in the parameter type. llvm-svn: 373643
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index e189b5235a9..847a19baed1 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -4922,9 +4922,7 @@ bool Sema::CheckTemplateArgument(NamedDecl *Param,
if (NTTP->isParameterPack() && NTTP->isExpandedParameterPack())
NTTPType = NTTP->getExpansionType(ArgumentPackIndex);
- // FIXME: Do we need to substitute into parameters here if they're
- // instantiation-dependent but not dependent?
- if (NTTPType->isDependentType() &&
+ if (NTTPType->isInstantiationDependentType() &&
!isa<TemplateTemplateParmDecl>(Template) &&
!Template->getDeclContext()->isDependentContext()) {
// Do substitution on the type of the non-type template parameter.
OpenPOWER on IntegriCloud