[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:50:41 PST 2024


https://github.com/martinboehme created https://github.com/llvm/llvm-project/pull/82239

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

>From eb81951622c11c2f23c8dde61eac6ad79fdd67cb Mon Sep 17 00:00:00 2001
From: Martin Braenne <mboehme at google.com>
Date: Mon, 19 Feb 2024 11:48:47 +0000
Subject: [PATCH] [clang][dataflow][NFC] Add a FIXME to handling of union
 initialization.

We want to make it clear that the current behavior doesn't yet handle unions
properly.
---
 clang/lib/Analysis/FlowSensitive/Transfer.cpp | 1 +
 1 file changed, 1 insertion(+)

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;



More information about the cfe-commits mailing list