[Mlir-commits] [flang] [mlir] Make MLIR Value more consistent in terms of `const` "correctness" (NFC) (PR #72765)
Mehdi Amini
llvmlistbot at llvm.org
Mon Nov 20 17:59:52 PST 2023
================
@@ -335,8 +335,9 @@ namespace llvm {
MutableArrayRef(T *begin, T *end) : ArrayRef<T>(begin, end) {}
/// Construct a MutableArrayRef from a SmallVector.
- /*implicit*/ MutableArrayRef(SmallVectorImpl<T> &Vec)
- : ArrayRef<T>(Vec) {}
+ template <typename U>
+ /*implicit*/ MutableArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
+ : ArrayRef<T>(Vec) {}
----------------
joker-eph wrote:
> Not sure I follow that - most changes allow things to compile that didn't before (adding a new function, etc), so I'm not sure I follow that being a relevant criteria.
I feel you're being pedantic about it here: there is no possibe observable behavior different in the compiler behavior, there is code coverage in the project: hence that seems "good enough" for me.
Of course can go the extreme way in terms of testing, but I repeat that this isn't in line with the way we're testing in general: even if ADT has more unit-tests by nature, the "100% coverage through C++ unit-tests" isn't I believe a generalized trade-off we make in LLVM.
Most "NFC" patch are shuffling code around in a way that makes something compile/work that wasn't before, and yet we don't write unit-tests for every single change.
https://github.com/llvm/llvm-project/pull/72765
More information about the Mlir-commits
mailing list