Skip to content

Commit 0caa8a5

Browse files
committed
Add a fixme for using appropraite context
1 parent f67d035 commit 0caa8a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9162,6 +9162,9 @@ LValueExprEvaluator::VisitCompoundLiteralExpr(const CompoundLiteralExpr *E) {
91629162
Lit = &Info.CurrentCall->createTemporary(E, E->getInitializer()->getType(),
91639163
ScopeKind::Block, Result);
91649164
}
9165+
// FIXME: Evaluating in place isn't always right. We should figure out how to
9166+
// use appropriate evaluation context here, see
9167+
// clang/test/AST/static-compound-literals-reeval.cpp for a failure.
91659168
if (!EvaluateInPlace(*Lit, Info, Result, E->getInitializer())) {
91669169
*Lit = APValue();
91679170
return false;

0 commit comments

Comments
 (0)