[PATCH] D65942: Disallow implicit conversion from pointers to bool in llvm::toStringRef
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 13:26:38 PDT 2019
dblaikie added a comment.
Yeah, might be worth changing toStringRef to only accept bools:
template<typename T>
typename std::enable_if<std::is_same<T, bool>::value, StringRef>::type toStringRef(T B) { ... }
Or something like that?
That'd avoid accidental "toStringRef(5)" or the like...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65942/new/
https://reviews.llvm.org/D65942
More information about the llvm-commits
mailing list