sammccall added a comment. In D137825#3921273 <https://reviews.llvm.org/D137825#3921273>, @tschuett wrote:
> You could: > > static_assert(std::variant_size_v<....> == 2); > > Kind kind() const { if (std::holds_alternative<SourceLocation>(Storage)) > return Kind::Physical; return Kind::Standard; } > > and Kind could become `enum class Kind`. => You would get rid of the order on > the variant and the `static_cast`. Sure, but that's IMO less regular, harder to understand, and easier to get wrong when updating. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137825/new/ https://reviews.llvm.org/D137825 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits