Skip to content

Commit 1b8bedb

Browse files
[Support] Fix the style of type aliases (NFC) (#157141)
This patch renames several type aliases to stick to the LLVM coding standards.
1 parent 627b77a commit 1b8bedb

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

llvm/include/llvm/Support/YAMLTraits.h

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -305,138 +305,138 @@ template <typename T> struct MissingTrait;
305305

306306
// Test if ScalarEnumerationTraits<T> is defined on type T.
307307
template <class T> struct has_ScalarEnumerationTraits {
308-
using Signature_enumeration = void (*)(class IO &, T &);
308+
using SignatureEnumeration = void (*)(class IO &, T &);
309309

310310
template <class U>
311311
using check =
312-
SameType<Signature_enumeration, &ScalarEnumerationTraits<U>::enumeration>;
312+
SameType<SignatureEnumeration, &ScalarEnumerationTraits<U>::enumeration>;
313313

314314
static constexpr bool value = is_detected<check, T>::value;
315315
};
316316

317317
// Test if ScalarBitSetTraits<T> is defined on type T.
318318
template <class T> struct has_ScalarBitSetTraits {
319-
using Signature_bitset = void (*)(class IO &, T &);
319+
using SignatureBitset = void (*)(class IO &, T &);
320320

321321
template <class U>
322-
using check = SameType<Signature_bitset, &ScalarBitSetTraits<U>::bitset>;
322+
using check = SameType<SignatureBitset, &ScalarBitSetTraits<U>::bitset>;
323323

324324
static constexpr bool value = is_detected<check, T>::value;
325325
};
326326

327327
// Test if ScalarTraits<T> is defined on type T.
328328
template <class T> struct has_ScalarTraits {
329-
using Signature_input = StringRef (*)(StringRef, void *, T &);
330-
using Signature_output = void (*)(const T &, void *, raw_ostream &);
331-
using Signature_mustQuote = QuotingType (*)(StringRef);
329+
using SignatureInput = StringRef (*)(StringRef, void *, T &);
330+
using SignatureOutput = void (*)(const T &, void *, raw_ostream &);
331+
using SignatureMustQuote = QuotingType (*)(StringRef);
332332

333333
template <class U>
334-
using check = std::tuple<SameType<Signature_input, &U::input>,
335-
SameType<Signature_output, &U::output>,
336-
SameType<Signature_mustQuote, &U::mustQuote>>;
334+
using check = std::tuple<SameType<SignatureInput, &U::input>,
335+
SameType<SignatureOutput, &U::output>,
336+
SameType<SignatureMustQuote, &U::mustQuote>>;
337337

338338
static constexpr bool value = is_detected<check, ScalarTraits<T>>::value;
339339
};
340340

341341
// Test if BlockScalarTraits<T> is defined on type T.
342342
template <class T> struct has_BlockScalarTraits {
343-
using Signature_input = StringRef (*)(StringRef, void *, T &);
344-
using Signature_output = void (*)(const T &, void *, raw_ostream &);
343+
using SignatureInput = StringRef (*)(StringRef, void *, T &);
344+
using SignatureOutput = void (*)(const T &, void *, raw_ostream &);
345345

346346
template <class U>
347-
using check = std::tuple<SameType<Signature_input, &U::input>,
348-
SameType<Signature_output, &U::output>>;
347+
using check = std::tuple<SameType<SignatureInput, &U::input>,
348+
SameType<SignatureOutput, &U::output>>;
349349

350350
static constexpr bool value = is_detected<check, BlockScalarTraits<T>>::value;
351351
};
352352

353353
// Test if TaggedScalarTraits<T> is defined on type T.
354354
template <class T> struct has_TaggedScalarTraits {
355-
using Signature_input = StringRef (*)(StringRef, StringRef, void *, T &);
356-
using Signature_output = void (*)(const T &, void *, raw_ostream &,
357-
raw_ostream &);
358-
using Signature_mustQuote = QuotingType (*)(const T &, StringRef);
355+
using SignatureInput = StringRef (*)(StringRef, StringRef, void *, T &);
356+
using SignatureOutput = void (*)(const T &, void *, raw_ostream &,
357+
raw_ostream &);
358+
using SignatureMustQuote = QuotingType (*)(const T &, StringRef);
359359

360360
template <class U>
361-
using check = std::tuple<SameType<Signature_input, &U::input>,
362-
SameType<Signature_output, &U::output>,
363-
SameType<Signature_mustQuote, &U::mustQuote>>;
361+
using check = std::tuple<SameType<SignatureInput, &U::input>,
362+
SameType<SignatureOutput, &U::output>,
363+
SameType<SignatureMustQuote, &U::mustQuote>>;
364364

365365
static constexpr bool value =
366366
is_detected<check, TaggedScalarTraits<T>>::value;
367367
};
368368

369369
// Test if MappingContextTraits<T> is defined on type T.
370370
template <class T, class Context> struct has_MappingTraits {
371-
using Signature_mapping = void (*)(class IO &, T &, Context &);
371+
using SignatureMapping = void (*)(class IO &, T &, Context &);
372372

373-
template <class U> using check = SameType<Signature_mapping, &U::mapping>;
373+
template <class U> using check = SameType<SignatureMapping, &U::mapping>;
374374

375375
static constexpr bool value =
376376
is_detected<check, MappingContextTraits<T, Context>>::value;
377377
};
378378

379379
// Test if MappingTraits<T> is defined on type T.
380380
template <class T> struct has_MappingTraits<T, EmptyContext> {
381-
using Signature_mapping = void (*)(class IO &, T &);
381+
using SignatureMapping = void (*)(class IO &, T &);
382382

383-
template <class U> using check = SameType<Signature_mapping, &U::mapping>;
383+
template <class U> using check = SameType<SignatureMapping, &U::mapping>;
384384

385385
static constexpr bool value = is_detected<check, MappingTraits<T>>::value;
386386
};
387387

388388
// Test if MappingContextTraits<T>::validate() is defined on type T.
389389
template <class T, class Context> struct has_MappingValidateTraits {
390-
using Signature_validate = std::string (*)(class IO &, T &, Context &);
390+
using SignatureValidate = std::string (*)(class IO &, T &, Context &);
391391

392-
template <class U> using check = SameType<Signature_validate, &U::validate>;
392+
template <class U> using check = SameType<SignatureValidate, &U::validate>;
393393

394394
static constexpr bool value =
395395
is_detected<check, MappingContextTraits<T, Context>>::value;
396396
};
397397

398398
// Test if MappingTraits<T>::validate() is defined on type T.
399399
template <class T> struct has_MappingValidateTraits<T, EmptyContext> {
400-
using Signature_validate = std::string (*)(class IO &, T &);
400+
using SignatureValidate = std::string (*)(class IO &, T &);
401401

402-
template <class U> using check = SameType<Signature_validate, &U::validate>;
402+
template <class U> using check = SameType<SignatureValidate, &U::validate>;
403403

404404
static constexpr bool value = is_detected<check, MappingTraits<T>>::value;
405405
};
406406

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

411-
template <class U> using check = SameType<Signature_enumInput, &U::enumInput>;
411+
template <class U> using check = SameType<SignatureEnumInput, &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_enumInput = void (*)(class IO &, T &);
419+
using SignatureEnumInput = void (*)(class IO &, T &);
420420

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

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

426426
// Test if SequenceTraits<T> is defined on type T.
427427
template <class T> struct has_SequenceMethodTraits {
428-
using Signature_size = size_t (*)(class IO &, T &);
428+
using SignatureSize = size_t (*)(class IO &, T &);
429429

430-
template <class U> using check = SameType<Signature_size, &U::size>;
430+
template <class U> using check = SameType<SignatureSize, &U::size>;
431431

432432
static constexpr bool value = is_detected<check, SequenceTraits<T>>::value;
433433
};
434434

435435
// Test if CustomMappingTraits<T> is defined on type T.
436436
template <class T> struct has_CustomMappingTraits {
437-
using Signature_input = void (*)(IO &io, StringRef key, T &v);
437+
using SignatureInput = void (*)(IO &io, StringRef key, T &v);
438438

439-
template <class U> using check = SameType<Signature_input, &U::inputOne>;
439+
template <class U> using check = SameType<SignatureInput, &U::inputOne>;
440440

441441
static constexpr bool value =
442442
is_detected<check, CustomMappingTraits<T>>::value;
@@ -464,18 +464,18 @@ struct has_SequenceTraits
464464

465465
// Test if DocumentListTraits<T> is defined on type T
466466
template <class T> struct has_DocumentListTraits {
467-
using Signature_size = size_t (*)(class IO &, T &);
467+
using SignatureSize = size_t (*)(class IO &, T &);
468468

469-
template <class U> using check = SameType<Signature_size, &U::size>;
469+
template <class U> using check = SameType<SignatureSize, &U::size>;
470470

471471
static constexpr bool value =
472472
is_detected<check, DocumentListTraits<T>>::value;
473473
};
474474

475475
template <class T> struct has_PolymorphicTraits {
476-
using Signature_getKind = NodeKind (*)(const T &);
476+
using SignatureGetKind = NodeKind (*)(const T &);
477477

478-
template <class U> using check = SameType<Signature_getKind, &U::getKind>;
478+
template <class U> using check = SameType<SignatureGetKind, &U::getKind>;
479479

480480
static constexpr bool value = is_detected<check, PolymorphicTraits<T>>::value;
481481
};

0 commit comments

Comments
 (0)