[MLIR] Hide FailureOr::hasValue()
authorChristian Sigg <csigg@google.com>
Mon, 21 Nov 2022 06:40:54 +0000 (07:40 +0100)
committerChristian Sigg <csigg@google.com>
Mon, 21 Nov 2022 17:35:32 +0000 (18:35 +0100)
`Optional<T>::hasValue()` is deprecated and should be private like `has_value()`.

Reviewed By: tpopp, bondhugula

Differential Revision: https://reviews.llvm.org/D138400

mlir/include/mlir/Support/LogicalResult.h

index e3163fe..ddd3389 100644 (file)
@@ -96,6 +96,7 @@ public:
 private:
   /// Hide the bool conversion as it easily creates confusion.
   using Optional<T>::operator bool;
+  using Optional<T>::hasValue;
   using Optional<T>::has_value;
 };