Emit initializers for static-storage-duration temporaries as constants where
possible.
llvm-svn: 183967
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 96550f9..86dcbd0 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -4093,6 +4093,7 @@
APValue *Value;
if (E->getStorageDuration() == SD_Static) {
Value = Info.Ctx.getMaterializedTemporaryValue(E, true);
+ *Value = APValue();
Result.set(E);
} else {
Value = &Info.CurrentCall->Temporaries[E];