[clang] [clang][bytecode] Fix reading union template parameter object (PR #179899)

Timm Baeder via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 5 06:18:17 PST 2026


================
@@ -5069,14 +5069,30 @@ bool Compiler<Emitter>::visitAPValueInitializer(const APValue &Val,
   }
   if (Val.isUnion()) {
     const FieldDecl *UnionField = Val.getUnionField();
-    const Record *R = this->getRecord(UnionField->getParent());
+    if (!UnionField)
+      // no active fields
----------------
tbaederr wrote:

```suggestion
```

https://github.com/llvm/llvm-project/pull/179899


More information about the cfe-commits mailing list