mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-27 16:38:30 +00:00
Make some operator bools explicit for sanity/safety.
There are a couple left in bool-like containers (BitVector, etc) where the implicit conversions seem more suitable - though it might be worth considering explicitifying those too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1f1e5c29c3
commit
ae69f7de68
@ -94,7 +94,7 @@ public:
|
||||
return HelperT::template Lookup<N>::TraitsT::getFromVoidPointer(getImpl());
|
||||
}
|
||||
|
||||
operator bool() const { return Value & HelperT::PointerMask; }
|
||||
explicit operator bool() const { return Value & HelperT::PointerMask; }
|
||||
bool operator==(const PointerSumType &R) const { return Value == R.Value; }
|
||||
bool operator!=(const PointerSumType &R) const { return Value != R.Value; }
|
||||
bool operator<(const PointerSumType &R) const { return Value < R.Value; }
|
||||
|
@ -148,7 +148,7 @@ public:
|
||||
///
|
||||
/// This happens when an edge has been deleted. We leave the edge objects
|
||||
/// around but clear them.
|
||||
operator bool() const;
|
||||
explicit operator bool() const;
|
||||
|
||||
/// Returnss the \c Kind of the edge.
|
||||
Kind getKind() const;
|
||||
|
@ -201,7 +201,7 @@ public:
|
||||
|
||||
void reset();
|
||||
|
||||
operator bool() const;
|
||||
explicit operator bool() const;
|
||||
|
||||
StringRef getName() const { return Name; }
|
||||
StringRef getDescription() const { return Description; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user