[clang] [clang][dataflow][NFC] Add a FIXME to handling of union initialization. (PR #82239)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 19 03:51:07 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-analysis
Author: None (martinboehme)
<details>
<summary>Changes</summary>
We want to make it clear that the current behavior doesn't yet handle unions
properly.
---
Full diff: https://github.com/llvm/llvm-project/pull/82239.diff
1 Files Affected:
- (modified) clang/lib/Analysis/FlowSensitive/Transfer.cpp (+1)
``````````diff
diff --git a/clang/lib/Analysis/FlowSensitive/Transfer.cpp b/clang/lib/Analysis/FlowSensitive/Transfer.cpp
index 513f22d8aa0f9c..fe13e919bddcd8 100644
--- a/clang/lib/Analysis/FlowSensitive/Transfer.cpp
+++ b/clang/lib/Analysis/FlowSensitive/Transfer.cpp
@@ -664,6 +664,7 @@ class TransferVisitor : public ConstStmtVisitor<TransferVisitor> {
QualType Type = S->getType();
if (Type->isUnionType()) {
+ // FIXME: Initialize unions properly.
if (auto *Val = Env.createValue(Type))
Env.setValue(*S, *Val);
return;
``````````
</details>
https://github.com/llvm/llvm-project/pull/82239
More information about the cfe-commits
mailing list