Skip to content

Commit ba4abc6

Browse files
authored
[Support] Fix up cast function object definitions. NFC. (#166789)
The template arguments specify the *target* type, not the *source* type.
1 parent 5f08fb4 commit ba4abc6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/include/llvm/Support/Casting.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -878,18 +878,18 @@ inline constexpr detail::IsaAndPresentCheckPredicate<Types...>
878878
IsaAndPresentPred{};
879879

880880
/// Function objects corresponding to the Cast types defined above.
881-
template <typename From>
882-
inline constexpr detail::StaticCastFunc<From> StaticCastTo{};
881+
template <typename To>
882+
inline constexpr detail::StaticCastFunc<To> StaticCastTo{};
883883

884-
template <typename From> inline constexpr detail::CastFunc<From> CastTo{};
884+
template <typename To> inline constexpr detail::CastFunc<To> CastTo{};
885885

886-
template <typename From>
887-
inline constexpr detail::CastIfPresentFunc<From> CastIfPresentTo{};
886+
template <typename To>
887+
inline constexpr detail::CastIfPresentFunc<To> CastIfPresentTo{};
888888

889-
template <typename From>
890-
inline constexpr detail::DynCastIfPresentFunc<From> DynCastIfPresentTo{};
889+
template <typename To>
890+
inline constexpr detail::DynCastIfPresentFunc<To> DynCastIfPresentTo{};
891891

892-
template <typename From> inline constexpr detail::DynCastFunc<From> DynCastTo{};
892+
template <typename To> inline constexpr detail::DynCastFunc<To> DynCastTo{};
893893

894894
} // end namespace llvm
895895

0 commit comments

Comments
 (0)