[all-commits] [llvm/llvm-project] 8b3d4b: [clang] Remove hasValue() check in `RecordExprEval...
Timm Baeder via All-commits
all-commits at lists.llvm.org
Fri Aug 22 23:02:09 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8b3d4bdf8bade1d1faa8ff3fcbdda7060f8b46d8
https://github.com/llvm/llvm-project/commit/8b3d4bdf8bade1d1faa8ff3fcbdda7060f8b46d8
Author: Timm Baeder <tbaeder at redhat.com>
Date: 2025-08-23 (Sat, 23 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