[all-commits] [llvm/llvm-project] 3263ad: [clang] Remove hasValue() check in `RecordExprEval...
Timm Baeder via All-commits
all-commits at lists.llvm.org
Mon Aug 25 23:39:22 PDT 2025
Branch: refs/heads/release/21.x
Home: https://github.com/llvm/llvm-project
Commit: 3263ad76c4301692416e40b2222ee7043996a59a
https://github.com/llvm/llvm-project/commit/3263ad76c4301692416e40b2222ee7043996a59a
Author: Timm Baeder <tbaeder at redhat.com>
Date: 2025-08-26 (Tue, 26 Aug 2025)
Changed paths:
M clang/lib/AST/ExprConstant.cpp
M clang/test/SemaCXX/constant-expression-cxx11.cpp
Log Message:
-----------
[clang] Remove hasValue() check in `RecordExprEvaluator::VisitCXXConstructExpr()` (#154610)
When initializing an anonymous struct via an `IndirectFieldDecl`, we
create an `APValue` for the struct, but we leave the fields
uninitialized. This would later cause the `CXXConstructExpr` that
initializes the anonymous struct member to not do anything since its
`APValue` already had a value (but the member didn't). Just remove the
check for an `APValue` that already has a value from
`RecordExprEvaluator::VisitCXXConstructExpr()`.
Fixes #154567
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list