Make mlir::Value's bool conversion operator explicit
authorBenjamin Kramer <benny.kra@googlemail.com>
Sun, 24 May 2020 21:08:27 +0000 (23:08 +0200)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 25 May 2020 16:22:00 +0000 (18:22 +0200)
commita9b5edc5e2c4ec9d506b2c30465ee9f2dc21e5cc
tree57a1cff24b3e416415f66366cbe83730de9d18ae
parent3873d0b3d899bb84a5983450dd2d98006c4527e2
Make mlir::Value's bool conversion operator explicit

This still allows `if (value)` while requiring an explicit cast when not
in a boolean context. This means things like `std::set<Value>` will no
longer compile.

Differential Revision: https://reviews.llvm.org/D80497
mlir/include/mlir/EDSC/Builders.h
mlir/include/mlir/IR/Value.h
mlir/lib/Conversion/VectorToSCF/VectorToSCF.cpp
mlir/lib/Parser/Parser.cpp