mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-24 09:29:42 +00:00
Poison the relational operators ==, !=, <, <=, >=, > on llvm::Optional
objects, since they'll end up using the implicit conversion to "bool" and causing some very "fun" surprises. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125380 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
71132af89a
commit
78b9649d46
@ -61,6 +61,60 @@ template <typename T>
|
|||||||
struct simplify_type<Optional<T> >
|
struct simplify_type<Optional<T> >
|
||||||
: public simplify_type<const Optional<T> > {};
|
: public simplify_type<const Optional<T> > {};
|
||||||
|
|
||||||
|
/// \brief Poison comparison between two \c Optional objects. Clients needs to
|
||||||
|
/// explicitly compare the underlying values and account for empty \c Optional
|
||||||
|
/// objects.
|
||||||
|
///
|
||||||
|
/// This routine will never be defined. It returns \c void to help diagnose
|
||||||
|
/// errors at compile time.
|
||||||
|
template<typename T, typename U>
|
||||||
|
void operator==(const Optional<T> &X, const Optional<U> &Y);
|
||||||
|
|
||||||
|
/// \brief Poison comparison between two \c Optional objects. Clients needs to
|
||||||
|
/// explicitly compare the underlying values and account for empty \c Optional
|
||||||
|
/// objects.
|
||||||
|
///
|
||||||
|
/// This routine will never be defined. It returns \c void to help diagnose
|
||||||
|
/// errors at compile time.
|
||||||
|
template<typename T, typename U>
|
||||||
|
void operator!=(const Optional<T> &X, const Optional<U> &Y);
|
||||||
|
|
||||||
|
/// \brief Poison comparison between two \c Optional objects. Clients needs to
|
||||||
|
/// explicitly compare the underlying values and account for empty \c Optional
|
||||||
|
/// objects.
|
||||||
|
///
|
||||||
|
/// This routine will never be defined. It returns \c void to help diagnose
|
||||||
|
/// errors at compile time.
|
||||||
|
template<typename T, typename U>
|
||||||
|
void operator<(const Optional<T> &X, const Optional<U> &Y);
|
||||||
|
|
||||||
|
/// \brief Poison comparison between two \c Optional objects. Clients needs to
|
||||||
|
/// explicitly compare the underlying values and account for empty \c Optional
|
||||||
|
/// objects.
|
||||||
|
///
|
||||||
|
/// This routine will never be defined. It returns \c void to help diagnose
|
||||||
|
/// errors at compile time.
|
||||||
|
template<typename T, typename U>
|
||||||
|
void operator<=(const Optional<T> &X, const Optional<U> &Y);
|
||||||
|
|
||||||
|
/// \brief Poison comparison between two \c Optional objects. Clients needs to
|
||||||
|
/// explicitly compare the underlying values and account for empty \c Optional
|
||||||
|
/// objects.
|
||||||
|
///
|
||||||
|
/// This routine will never be defined. It returns \c void to help diagnose
|
||||||
|
/// errors at compile time.
|
||||||
|
template<typename T, typename U>
|
||||||
|
void operator>=(const Optional<T> &X, const Optional<U> &Y);
|
||||||
|
|
||||||
|
/// \brief Poison comparison between two \c Optional objects. Clients needs to
|
||||||
|
/// explicitly compare the underlying values and account for empty \c Optional
|
||||||
|
/// objects.
|
||||||
|
///
|
||||||
|
/// This routine will never be defined. It returns \c void to help diagnose
|
||||||
|
/// errors at compile time.
|
||||||
|
template<typename T, typename U>
|
||||||
|
void operator>(const Optional<T> &X, const Optional<U> &Y);
|
||||||
|
|
||||||
} // end llvm namespace
|
} // end llvm namespace
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user