[Mlir-commits] [mlir] [mlir] Use {} instead of std::nullopt to initialize empty ArrayRef (PR #109527)
Kazu Hirata
llvmlistbot at llvm.org
Sat Sep 21 15:25:51 PDT 2024
kazutakahirata wrote:
> While I do support replacing `std::nullopt` with `{}` where possible, necessity of using fully qualified `llvm::ArrayRef<NamedAttribute>()` names in templated functions seems to be contradiction to the original intent and I don't like this idea.
While the change to a longer fully qualified name is unfortunate, I think there is another aspect in this migration away from `std::nullopt`, which is that we will use `std::nullopt` only to express the empty `std::optional`. That is friendlier to newcomers to the LLVM project, who would typically see `std::nullopt` only in the context of `std::optional`.
https://github.com/llvm/llvm-project/pull/109527
More information about the Mlir-commits
mailing list