================
@@ -35,6 +36,44 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
   return OS;
 }
 
+class ReflectionValue {
+public:
+  // Note: 'NamespaceDecl' is currently unused; it's only here because
+  // it's an incomplete type in this header to make sure this pointer
+  // union works with incomplete types.
+  using OperandType =
+      llvm::PointerUnion<const TypeSourceInfo *, const NamespaceDecl *>;
+
+private:
+  ReflectionKind Kind;
+  OperandType Operand;
+
+  ReflectionValue(ReflectionKind Kind, OperandType Operand)
+      : Kind(Kind), Operand(Operand) {}
----------------
tbaederr wrote:

I _think_ the code base has been gradually moved towards default initializers 
for members, I think by @kazutakahirata?
Also, if both `Kind` and `Operand` can't be set outside of the constructor, 
should we make them `const`?

https://github.com/llvm/llvm-project/pull/236991
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to