summaryrefslogtreecommitdiff
path: root/lib/Sema
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
commitcf3ce1cf84cfd9f639a905a9e13047cf45cd9af6 (patch)
tree427b1fb2e2cc929ef4b027d99e39c352bab0ca2a /lib/Sema
parent488d876b0a3f5aedb4e605d17074051e0faaaa1f (diff)
downloadclang-cf3ce1cf84cfd9f639a905a9e13047cf45cd9af6.tar.gz
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373643 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaTemplate.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index e189b5235a..847a19baed 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/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.