Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | #define HUNGARIAN_NOTATION_PRIMITIVE_TYPES(m) \ | ||||
m(signed) \ | m(signed) \ | ||||
m(unsigned-long-long-int) \ | m(unsigned-long-long-int) \ | ||||
m(unsigned-long-long) \ | m(unsigned-long-long) \ | ||||
m(unsigned-long-int) \ | m(unsigned-long-int) \ | ||||
m(unsigned-long) \ | m(unsigned-long) \ | ||||
m(unsigned-short-int) \ | m(unsigned-short-int) \ | ||||
m(unsigned-short) \ | m(unsigned-short) \ | ||||
m(unsigned-int) \ | m(unsigned-int) \ | ||||
m(unsigned-char) \ | |||||
m(unsigned) \ | m(unsigned) \ | ||||
m(long-long-int) \ | m(long-long-int) \ | ||||
m(long-double) \ | m(long-double) \ | ||||
m(long-long) \ | m(long-long) \ | ||||
m(long-int) \ | m(long-int) \ | ||||
m(long) \ | m(long) \ | ||||
m(ptrdiff_t) \ | m(ptrdiff_t) \ | ||||
m(void) \ | |||||
static StringRef const HungarainNotationPrimitiveTypes[] = { | static StringRef const HungarainNotationPrimitiveTypes[] = { | ||||
#define STRINGIZE(v) #v, | #define STRINGIZE(v) #v, | ||||
HUNGARIAN_NOTATION_PRIMITIVE_TYPES(STRINGIZE) | HUNGARIAN_NOTATION_PRIMITIVE_TYPES(STRINGIZE) | ||||
#undef STRINGIZE | #undef STRINGIZE | ||||
}; | }; | ||||
#define HUNGARIAN_NOTATION_USER_DEFINED_TYPES(m) \ | #define HUNGARIAN_NOTATION_USER_DEFINED_TYPES(m) \ | ||||
▲ Show 20 Lines • Show All 555 Lines • ▼ Show 20 Lines | static constexpr std::pair<StringRef, StringRef> PrimitiveTypes[] = { | ||||
{"signed", "s" }, | {"signed", "s" }, | ||||
{"unsigned long long int", "ulli"}, | {"unsigned long long int", "ulli"}, | ||||
{"unsigned long long", "ull" }, | {"unsigned long long", "ull" }, | ||||
{"unsigned long int", "uli" }, | {"unsigned long int", "uli" }, | ||||
{"unsigned long", "ul" }, | {"unsigned long", "ul" }, | ||||
{"unsigned short int", "usi" }, | {"unsigned short int", "usi" }, | ||||
{"unsigned short", "us" }, | {"unsigned short", "us" }, | ||||
{"unsigned int", "ui" }, | {"unsigned int", "ui" }, | ||||
{"unsigned char", "uc" }, | |||||
{"unsigned", "u" }, | {"unsigned", "u" }, | ||||
{"long long int", "lli" }, | {"long long int", "lli" }, | ||||
{"long double", "ld" }, | {"long double", "ld" }, | ||||
{"long long", "ll" }, | {"long long", "ll" }, | ||||
{"long int", "li" }, | {"long int", "li" }, | ||||
{"long", "l" }, | {"long", "l" }, | ||||
{"ptrdiff_t", "p" }}; | {"ptrdiff_t", "p" }, | ||||
{"void", "" }}; | |||||
// clang-format on | // clang-format on | ||||
for (const auto &PT : PrimitiveTypes) | for (const auto &PT : PrimitiveTypes) | ||||
HNOption.PrimitiveType.try_emplace(PT.first, PT.second); | HNOption.PrimitiveType.try_emplace(PT.first, PT.second); | ||||
// clang-format off | // clang-format off | ||||
static constexpr std::pair<StringRef, StringRef> UserDefinedTypes[] = { | static constexpr std::pair<StringRef, StringRef> UserDefinedTypes[] = { | ||||
// Windows data types | // Windows data types | ||||
{"BOOL", "b" }, | {"BOOL", "b" }, | ||||
▲ Show 20 Lines • Show All 685 Lines • Show Last 20 Lines |