Home
last modified time | relevance | path

Searched refs:enumerators (Results 1 – 25 of 61) sorted by relevance

123

/llvm-project/clang-tools-extra/docs/clang-tidy/checks/readability/
H A Denum-initial-value.rst6 Enforces consistent style for enumerators' initialization, covering three
10 enumerators may cause issues if the enumeration is extended with new
11 enumerators that obtain their integer representation implicitly.
15 #. **No** enumerators are explicit initialized.
17 #. **All** enumerators are explicit initialized.
21 enum A { // (1) Valid, none of enumerators are initialized.
33 enum C { // (3) Valid, all of enumerators are initialized.
/llvm-project/lldb/source/Target/
H A DRegisterFlags.cpp248 const FieldEnum::Enumerators &enumerators) { in DumpEnumerators() argument
249 for (auto it = enumerators.cbegin(); it != enumerators.cend(); ++it) { in DumpEnumerators()
258 if (std::next(it) != enumerators.cend()) in DumpEnumerators()
297 const FieldEnum::Enumerators &enumerators = enum_type->GetEnumerators(); in DumpEnums() local
298 if (enumerators.empty()) in DumpEnums()
313 DumpEnumerators(strm, indent, current_width, max_width, enumerators); in DumpEnums()
344 const Enumerators &enumerators = GetEnumerators(); in ToXML() local
345 if (enumerators.empty()) { in ToXML()
352 for (const auto &enumerator : enumerators) { in ToXML()
423 FieldEnum::FieldEnum(std::string id, const Enumerators &enumerators) in FieldEnum() argument
[all …]
/llvm-project/clang-tools-extra/clang-tidy/readability/
H A DEnumInitialValueCheck.cpp24 return llvm::all_of(Node.enumerators(), [](const EnumConstantDecl *ECD) { in isNoneEnumeratorsInitialized()
31 for (const EnumConstantDecl *ECD : Node.enumerators()) { in isOnlyFirstEnumeratorInitialized()
41 return llvm::all_of(Node.enumerators(), [](const EnumConstantDecl *ECD) { in areAllEnumeratorsInitialized()
90 const EnumDecl::enumerator_range Enumerators = Node.enumerators(); in AST_MATCHER()
98 /// Excludes bitfields because enumerators initialized with the result of a
102 /// bitmask, evident when enumerators are only initialized with (potentially
104 /// enumerators are powers of two (e.g., 0, 1, 2).
106 const EnumDecl::enumerator_range Enumerators = Node.enumerators(); in AST_MATCHER()
175 for (const EnumConstantDecl *ECD : Enum->enumerators()) in check()
204 for (const EnumConstantDecl *ECD : llvm::drop_begin(Enum->enumerators()))
[all...]
/llvm-project/lldb/source/Interpreter/
H A DOptionValueEnumeration.cpp17 const OptionEnumValues &enumerators, enum_type value) in OptionValueEnumeration() argument
19 SetEnumerations(enumerators); in OptionValueEnumeration()
86 const OptionEnumValues &enumerators) { in SetEnumerations() argument
89 for (const auto &enumerator : enumerators) { in SetEnumerations()
/llvm-project/lldb/unittests/ValueObject/
H A DDumpValueObjectOptionsTests.cpp77 const std::vector<std::pair<const char *, UnderlyingType>> enumerators, in TestDumpEnum() argument
80 CompilerType enum_type = MakeEnumType(enumerators); in TestDumpEnum()
98 const std::vector<std::pair<const char *, UnderlyingType>> enumerators) { in MakeEnumType() argument
109 for (auto [name, value] : enumerators) in MakeEnumType()
170 // These enumerators set individual bits in the value, as if it were a flag in TEST_F()
173 // enumerators and any remaining value left over. in TEST_F()
/llvm-project/lldb/source/Plugins/RegisterTypeBuilder/
H A DRegisterTypeBuilderClang.cpp72 const FieldEnum::Enumerators &enumerators = enum_type->GetEnumerators(); in GetRegisterType() local
73 if (!enumerators.empty()) { in GetRegisterType()
98 for (auto enumerator : enumerators) { in GetRegisterType()
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/performance/
H A Denum-size.rst7 class based on the range of its enumerators. Analyzes the values of the
8 enumerators in an ``enum`` or ``enum`` class, including signed values, to
30 case, and its enumerators have values of -1, 0, and 1. Additionally, the
61 Enums without enumerators (empty) are excluded from analysis.
/llvm-project/lldb/source/Core/
H A DDumpRegisterInfo.cpp117 std::string enumerators = flags_type->DumpEnums(terminal_width); in DoDumpRegisterInfo() local
118 if (enumerators.size()) in DoDumpRegisterInfo()
119 strm << "\n\n" << enumerators; in DoDumpRegisterInfo()
/llvm-project/lldb/include/lldb/Interpreter/
H A DOptionValueEnumeration.h33 OptionValueEnumeration(const OptionEnumValues &enumerators, enum_type value);
72 void SetEnumerations(const OptionEnumValues &enumerators);
/llvm-project/clang-tools-extra/clang-tidy/bugprone/
H A DSuspiciousEnumUsageCheck.cpp88 return llvm::count_if(EnumDec->enumerators(), isNonPowerOf2NorNullLiteral); in countNonPowOfTwoLiteralNum()
174 if (EnumDec->enumerators().empty() || OtherEnumDec->enumerators().empty()) in check()
/llvm-project/clang/utils/ABITest/
H A DTypeGen.py65 def __init__(self, index, enumerators): argument
67 self.enumerators = enumerators
73 for i, init in enumerate(self.enumerators):
304 for enumerators in combinations(self.values, numEnumerators):
306 return EnumType(n, enumerators)
/llvm-project/clang-tools-extra/clang-tidy/performance/
H A DEnumSizeCheck.cpp26 AST_MATCHER(EnumDecl, hasEnumerators) { return !Node.enumerators().empty(); } in AST_MATCHER()
117 for (const auto &It : MatchedDecl->enumerators()) { in check()
/llvm-project/clang-tools-extra/clangd/refactor/tweaks/
H A DScopifyEnum.cpp127 for (const EnumConstantDecl *E : D->enumerators()) { in scopifyEnumValues()
133 for (const EnumConstantDecl *E : D->enumerators()) { in scopifyEnumValues()
H A DPopulateSwitch.cpp138 for (auto *EnumConstant : EnumD->enumerators()) { in REGISTER_TWEAK()
/llvm-project/llvm/include/llvm/BinaryFormat/
H A DSwift.def9 // Macros for running through Swift enumerators.
H A DMsgPack.def10 /// Macros for running through MessagePack enumerators.
/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/
H A DClangPersistentVariables.cpp97 for (clang::EnumConstantDecl *enumerator_decl : enum_decl->enumerators()) { in RegisterPersistentDecl()
/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DEnumCastOutOfRangeChecker.cpp77 llvm::transform(ED->enumerators(), DeclValues.begin(), in getDeclValuesForEnum()
/llvm-project/lldb/include/lldb/Target/
H A DRegisterFlags.h44 FieldEnum(std::string id, const Enumerators &enumerators);
/llvm-project/clang-tools-extra/docs/clang-tidy/checks/bugprone/
H A Dnon-zero-enum-to-bool-conversion.rst8 values equal to its enumerators, then conversion to ``bool`` will always result
/llvm-project/libcxx/utils/
H A Dgenerate_indic_conjunct_break_table.py81 {enumerators},
264 PROP_VALUE_ENUM_TEMPLATE.format(enumerators=",\n".join(enumerator_values))
H A Dgenerate_extended_grapheme_cluster_table.py81 {enumerators},
271 PROP_VALUE_ENUM_TEMPLATE.format(enumerators=",\n".join(enumerator_values))
/llvm-project/clang/lib/Sema/
H A DSemaBPF.cpp108 return llvm::is_contained(ET->getDecl()->enumerators(), Enumerator); in isValidPreserveEnumValueArg()
/llvm-project/clang/include/clang/Basic/
H A DDeclNodes.td37 def EnumConstant : DeclNode<Value, "enumerators">;
/llvm-project/llvm/test/tools/llvm-debuginfo-analyzer/DWARF/
H A D04-dwarf-missing-nested-enumerators.test25 ; references to the enumerators 'RED' and 'BLUE'. The DWARF generated

123