Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang][dataflow][NFC] Add a FIXME to handling of union initialization. #82239

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

martinboehme
Copy link
Contributor

We want to make it clear that the current behavior doesn't yet handle unions
properly.

We want to make it clear that the current behavior doesn't yet handle unions
properly.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang:analysis labels Feb 19, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 19, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-analysis

Author: None (martinboehme)

Changes

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 --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;

@martinboehme martinboehme merged commit 5911334 into llvm:main Feb 20, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:analysis clang:dataflow Clang Dataflow Analysis framework - https://clang.llvm.org/docs/DataFlowAnalysisIntro.html clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants