Michael137 wrote: > This is just moving stuff around so that seems fine. Though, I wonder, could > we just pass e.g. an `ArrayRef<Decl*>` to `computeEnumBits()`? The LLDB pr > you linked seems to have an `SmallVector<EnumConstantDecl*>`, so that should > be possible (I think it does require a `reinterpret_cast` from a `const > Decl**` to a `const EnumConstantDecl**`, but we already do that in other > places in Clang iirc).
The reason I suggested the template initially was because in LLDB's case we don't have the `EnumConstantDecl`s in a container. We only have an `EnumDecl`. So the plan was to pass the `enumerators()` iterator into `computeEnumBits`. But if you know of a good way to turn the range into a container that we can pass as an `ArrayRef`, or some non-template way of passing both an `iterator_range` and `ArrayRef` into `computeEnumBits`, that'd be great! https://github.com/llvm/llvm-project/pull/126096 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits