Skip to content

Commit c11d808

Browse files
[Support] Fix copy-paste errors in YAMLTraits.h (llvm#157022)
has_MappingEnumInputTraits and its EmptyContext specialization define Signature_validate to check for a member function named enumInput. Note that in other YAML traits, Signature_foo is used to test the presence of member method foo. This patch fixes these copy-paste errors.
1 parent 91a48b1 commit c11d808

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/include/llvm/Support/YAMLTraits.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,19 +406,19 @@ template <class T> struct has_MappingValidateTraits<T, EmptyContext> {
406406

407407
// Test if MappingContextTraits<T>::enumInput() is defined on type T.
408408
template <class T, class Context> struct has_MappingEnumInputTraits {
409-
using Signature_validate = void (*)(class IO &, T &);
409+
using Signature_enumInput = void (*)(class IO &, T &);
410410

411-
template <class U> using check = SameType<Signature_validate, &U::enumInput>;
411+
template <class U> using check = SameType<Signature_enumInput, &U::enumInput>;
412412

413413
static constexpr bool value =
414414
is_detected<check, MappingContextTraits<T, Context>>::value;
415415
};
416416

417417
// Test if MappingTraits<T>::enumInput() is defined on type T.
418418
template <class T> struct has_MappingEnumInputTraits<T, EmptyContext> {
419-
using Signature_validate = void (*)(class IO &, T &);
419+
using Signature_enumInput = void (*)(class IO &, T &);
420420

421-
template <class U> using check = SameType<Signature_validate, &U::enumInput>;
421+
template <class U> using check = SameType<Signature_enumInput, &U::enumInput>;
422422

423423
static constexpr bool value = is_detected<check, MappingTraits<T>>::value;
424424
};

0 commit comments

Comments
 (0)