llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

<details>
<summary>Changes</summary>

We never use it anyway.

This code has been introduced in
410306bf6ed906af77978caa199e5d96376bae66, but it didn't really do anything back 
then either, as far as I can tell.

Fixes #<!-- -->57135

---
Full diff: https://github.com/llvm/llvm-project/pull/67716.diff


1 Files Affected:

- (modified) clang/lib/AST/ExprConstant.cpp (+2-10) 


``````````diff
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index fea06b97259fe31..04a751f1b4d09fb 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -10950,16 +10950,8 @@ bool 
ArrayExprEvaluator::VisitCXXParenListOrInitListExpr(
 }
 
 bool ArrayExprEvaluator::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *E) {
-  LValue CommonLV;
-  if (E->getCommonExpr() &&
-      !Evaluate(Info.CurrentCall->createTemporary(
-                    E->getCommonExpr(),
-                    getStorageType(Info.Ctx, E->getCommonExpr()),
-                    ScopeKind::FullExpression, CommonLV),
-                Info, E->getCommonExpr()->getSourceExpr()))
-    return false;
-
-  auto *CAT = cast<ConstantArrayType>(E->getType()->castAsArrayTypeUnsafe());
+  const auto *CAT =
+      cast<ConstantArrayType>(E->getType()->castAsArrayTypeUnsafe());
 
   uint64_t Elements = CAT->getSize().getZExtValue();
   Result = APValue(APValue::UninitArray(), Elements, Elements);

``````````

</details>


https://github.com/llvm/llvm-project/pull/67716
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to