tschuett added a comment.

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`.


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

Reply via email to