Skip to content

Conversation

kazutakahirata
Copy link
Contributor

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.

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.
@llvmbot
Copy link
Member

llvmbot commented Sep 5, 2025

@llvm/pr-subscribers-llvm-support

Author: Kazu Hirata (kazutakahirata)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/157022.diff

1 Files Affected:

  • (modified) llvm/include/llvm/Support/YAMLTraits.h (+4-4)
diff --git a/llvm/include/llvm/Support/YAMLTraits.h b/llvm/include/llvm/Support/YAMLTraits.h
index 07ac080d2c235..7aeecdee0368f 100644
--- a/llvm/include/llvm/Support/YAMLTraits.h
+++ b/llvm/include/llvm/Support/YAMLTraits.h
@@ -406,9 +406,9 @@ template <class T> struct has_MappingValidateTraits<T, EmptyContext> {
 
 // Test if MappingContextTraits<T>::enumInput() is defined on type T.
 template <class T, class Context> struct has_MappingEnumInputTraits {
-  using Signature_validate = void (*)(class IO &, T &);
+  using Signature_enumInput = void (*)(class IO &, T &);
 
-  template <class U> using check = SameType<Signature_validate, &U::enumInput>;
+  template <class U> using check = SameType<Signature_enumInput, &U::enumInput>;
 
   static constexpr bool value =
       is_detected<check, MappingContextTraits<T, Context>>::value;
@@ -416,9 +416,9 @@ template <class T, class Context> struct has_MappingEnumInputTraits {
 
 // Test if MappingTraits<T>::enumInput() is defined on type T.
 template <class T> struct has_MappingEnumInputTraits<T, EmptyContext> {
-  using Signature_validate = void (*)(class IO &, T &);
+  using Signature_enumInput = void (*)(class IO &, T &);
 
-  template <class U> using check = SameType<Signature_validate, &U::enumInput>;
+  template <class U> using check = SameType<Signature_enumInput, &U::enumInput>;
 
   static constexpr bool value = is_detected<check, MappingTraits<T>>::value;
 };

@kazutakahirata kazutakahirata merged commit c11d808 into llvm:main Sep 5, 2025
11 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250904_Support_YAMLTraits branch September 5, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants