aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaTemplateInstantiate.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp
index 675cef7986..edafb00c22 100644
--- a/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/lib/Sema/SemaTemplateInstantiate.cpp
@@ -1812,9 +1812,11 @@ Sema::InstantiateClass(SourceLocation PointOfInstantiation,
ExprResult NewInit = SubstExpr(OldInit, TemplateArgs);
// If the initialization is no longer dependent, check it now.
- if ((OldField->getType()->isDependentType() || OldInit->isTypeDependent())
- && !NewField->getType()->isDependentType()
- && !NewInit.get()->isTypeDependent()) {
+ if ((OldField->getType()->isDependentType() || OldInit->isTypeDependent() ||
+ OldInit->isValueDependent()) &&
+ !NewField->getType()->isDependentType() &&
+ !NewInit.get()->isTypeDependent() &&
+ !NewInit.get()->isValueDependent()) {
// FIXME: handle list-initialization
SourceLocation EqualLoc = NewField->getLocation();
NewInit = PerformCopyInitialization(