annotate clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 79ff65ed7e25
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 //===--- IdentifierNamingCheck.h - clang-tidy -------------------*- C++ -*-===//
anatofuz
parents:
diff changeset
2 //
anatofuz
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
anatofuz
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
anatofuz
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
anatofuz
parents:
diff changeset
6 //
anatofuz
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERNAMINGCHECK_H
anatofuz
parents:
diff changeset
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERNAMINGCHECK_H
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 #include "../utils/RenamerClangTidyCheck.h"
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
13 #include "llvm/ADT/Optional.h"
150
anatofuz
parents:
diff changeset
14 namespace clang {
anatofuz
parents:
diff changeset
15 namespace tidy {
anatofuz
parents:
diff changeset
16 namespace readability {
anatofuz
parents:
diff changeset
17
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
18 enum StyleKind : int;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
19
150
anatofuz
parents:
diff changeset
20 /// Checks for identifiers naming style mismatch.
anatofuz
parents:
diff changeset
21 ///
anatofuz
parents:
diff changeset
22 /// This check will try to enforce coding guidelines on the identifiers naming.
anatofuz
parents:
diff changeset
23 /// It supports `lower_case`, `UPPER_CASE`, `camelBack` and `CamelCase` casing
anatofuz
parents:
diff changeset
24 /// and tries to convert from one to another if a mismatch is detected.
anatofuz
parents:
diff changeset
25 ///
anatofuz
parents:
diff changeset
26 /// It also supports a fixed prefix and suffix that will be prepended or
anatofuz
parents:
diff changeset
27 /// appended to the identifiers, regardless of the casing.
anatofuz
parents:
diff changeset
28 ///
anatofuz
parents:
diff changeset
29 /// Many configuration options are available, in order to be able to create
anatofuz
parents:
diff changeset
30 /// different rules for different kind of identifier. In general, the
anatofuz
parents:
diff changeset
31 /// rules are falling back to a more generic rule if the specific case is not
anatofuz
parents:
diff changeset
32 /// configured.
anatofuz
parents:
diff changeset
33 class IdentifierNamingCheck final : public RenamerClangTidyCheck {
anatofuz
parents:
diff changeset
34 public:
anatofuz
parents:
diff changeset
35 IdentifierNamingCheck(StringRef Name, ClangTidyContext *Context);
anatofuz
parents:
diff changeset
36 ~IdentifierNamingCheck();
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 enum CaseType {
anatofuz
parents:
diff changeset
41 CT_AnyCase = 0,
anatofuz
parents:
diff changeset
42 CT_LowerCase,
anatofuz
parents:
diff changeset
43 CT_CamelBack,
anatofuz
parents:
diff changeset
44 CT_UpperCase,
anatofuz
parents:
diff changeset
45 CT_CamelCase,
anatofuz
parents:
diff changeset
46 CT_CamelSnakeCase,
anatofuz
parents:
diff changeset
47 CT_CamelSnakeBack
anatofuz
parents:
diff changeset
48 };
anatofuz
parents:
diff changeset
49
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
50 enum HungarianPrefixType {
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
51 HPT_Off = 0,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
52 HPT_On,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
53 HPT_LowerCase,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
54 HPT_CamelCase,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
55 };
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
56
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
57 struct HungarianNotationOption {
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
58 HungarianNotationOption() : HPType(HungarianPrefixType::HPT_Off) {}
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
59
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
60 llvm::Optional<CaseType> Case;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
61 HungarianPrefixType HPType;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
62 llvm::StringMap<std::string> General;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
63 llvm::StringMap<std::string> CString;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
64 llvm::StringMap<std::string> PrimitiveType;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
65 llvm::StringMap<std::string> UserDefinedType;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
66 llvm::StringMap<std::string> DerivedType;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
67 };
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
68
150
anatofuz
parents:
diff changeset
69 struct NamingStyle {
anatofuz
parents:
diff changeset
70 NamingStyle() = default;
anatofuz
parents:
diff changeset
71
anatofuz
parents:
diff changeset
72 NamingStyle(llvm::Optional<CaseType> Case, const std::string &Prefix,
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
73 const std::string &Suffix, const std::string &IgnoredRegexpStr,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
74 HungarianPrefixType HPType);
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
75 NamingStyle(const NamingStyle &O) = delete;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
76 NamingStyle &operator=(NamingStyle &&O) = default;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
77 NamingStyle(NamingStyle &&O) = default;
150
anatofuz
parents:
diff changeset
78
anatofuz
parents:
diff changeset
79 llvm::Optional<CaseType> Case;
anatofuz
parents:
diff changeset
80 std::string Prefix;
anatofuz
parents:
diff changeset
81 std::string Suffix;
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
82 // Store both compiled and non-compiled forms so original value can be
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
83 // serialized
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
84 llvm::Regex IgnoredRegexp;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
85 std::string IgnoredRegexpStr;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
86
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
87 HungarianPrefixType HPType;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
88 };
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
89
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
90 struct HungarianNotation {
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
91 public:
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
92 bool checkOptionValid(int StyleKindIndex) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
93 bool isOptionEnabled(StringRef OptionKey,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
94 const llvm::StringMap<std::string> &StrMap) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
95 void loadDefaultConfig(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
96 IdentifierNamingCheck::HungarianNotationOption &HNOption) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
97 void loadFileConfig(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
98 const ClangTidyCheck::OptionsView &Options,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
99 IdentifierNamingCheck::HungarianNotationOption &HNOption) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
100
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
101 bool removeDuplicatedPrefix(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
102 SmallVector<StringRef, 8> &Words,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
103 const IdentifierNamingCheck::HungarianNotationOption &HNOption) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
104
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
105 std::string getPrefix(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
106 const Decl *D,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
107 const IdentifierNamingCheck::HungarianNotationOption &HNOption) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
108
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
109 std::string getDataTypePrefix(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
110 StringRef TypeName, const NamedDecl *ND,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
111 const IdentifierNamingCheck::HungarianNotationOption &HNOption) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
112
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
113 std::string getClassPrefix(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
114 const CXXRecordDecl *CRD,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
115 const IdentifierNamingCheck::HungarianNotationOption &HNOption) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
116
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
117 std::string getEnumPrefix(const EnumConstantDecl *ECD) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
118 std::string getDeclTypeName(const NamedDecl *ND) const;
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
119 };
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
120
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
121 struct FileStyle {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
122 FileStyle() : IsActive(false), IgnoreMainLikeFunctions(false) {}
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
123 FileStyle(SmallVectorImpl<Optional<NamingStyle>> &&Styles,
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
124 HungarianNotationOption HNOption, bool IgnoreMainLike)
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
125 : Styles(std::move(Styles)), HNOption(std::move(HNOption)),
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
126 IsActive(true), IgnoreMainLikeFunctions(IgnoreMainLike) {}
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
127
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
128 ArrayRef<Optional<NamingStyle>> getStyles() const {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
129 assert(IsActive);
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
130 return Styles;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
131 }
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
132
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
133 const HungarianNotationOption &getHNOption() const {
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
134 assert(IsActive);
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
135 return HNOption;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
136 }
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
137
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
138 bool isActive() const { return IsActive; }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
139 bool isIgnoringMainLikeFunction() const { return IgnoreMainLikeFunctions; }
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
140
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
141 private:
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
142 SmallVector<Optional<NamingStyle>, 0> Styles;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
143 HungarianNotationOption HNOption;
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
144 bool IsActive;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
145 bool IgnoreMainLikeFunctions;
150
anatofuz
parents:
diff changeset
146 };
anatofuz
parents:
diff changeset
147
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
148 IdentifierNamingCheck::FileStyle
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
149 getFileStyleFromOptions(const ClangTidyCheck::OptionsView &Options) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
150
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
151 bool
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
152 matchesStyle(StringRef Type, StringRef Name,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
153 const IdentifierNamingCheck::NamingStyle &Style,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
154 const IdentifierNamingCheck::HungarianNotationOption &HNOption,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
155 const NamedDecl *Decl) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
156
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
157 std::string
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
158 fixupWithCase(StringRef Type, StringRef Name, const Decl *D,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
159 const IdentifierNamingCheck::NamingStyle &Style,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
160 const IdentifierNamingCheck::HungarianNotationOption &HNOption,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
161 IdentifierNamingCheck::CaseType Case) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
162
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
163 std::string
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
164 fixupWithStyle(StringRef Type, StringRef Name,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
165 const IdentifierNamingCheck::NamingStyle &Style,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
166 const IdentifierNamingCheck::HungarianNotationOption &HNOption,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
167 const Decl *D) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
168
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
169 StyleKind findStyleKind(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
170 const NamedDecl *D,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
171 ArrayRef<llvm::Optional<IdentifierNamingCheck::NamingStyle>> NamingStyles,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
172 bool IgnoreMainLikeFunctions) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
173
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
174 llvm::Optional<RenamerClangTidyCheck::FailureInfo> getFailureInfo(
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
175 StringRef Type, StringRef Name, const NamedDecl *ND,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
176 SourceLocation Location,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
177 ArrayRef<llvm::Optional<IdentifierNamingCheck::NamingStyle>> NamingStyles,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
178 const IdentifierNamingCheck::HungarianNotationOption &HNOption,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
179 StyleKind SK, const SourceManager &SM, bool IgnoreFailedSplit) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
180
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
181 bool isParamInMainLikeFunction(const ParmVarDecl &ParmDecl,
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
182 bool IncludeMainLike) const;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
183
150
anatofuz
parents:
diff changeset
184 private:
anatofuz
parents:
diff changeset
185 llvm::Optional<FailureInfo>
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
186 getDeclFailureInfo(const NamedDecl *Decl,
150
anatofuz
parents:
diff changeset
187 const SourceManager &SM) const override;
anatofuz
parents:
diff changeset
188 llvm::Optional<FailureInfo>
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
189 getMacroFailureInfo(const Token &MacroNameTok,
150
anatofuz
parents:
diff changeset
190 const SourceManager &SM) const override;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
191 DiagInfo getDiagInfo(const NamingCheckId &ID,
150
anatofuz
parents:
diff changeset
192 const NamingCheckFailure &Failure) const override;
anatofuz
parents:
diff changeset
193
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
194 const FileStyle &getStyleForFile(StringRef FileName) const;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
195
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
196 /// Stores the style options as a vector, indexed by the specified \ref
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
197 /// StyleKind, for a given directory.
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
198 mutable llvm::StringMap<FileStyle> NamingStylesCache;
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
199 FileStyle *MainFileStyle;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
200 ClangTidyContext *Context;
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
201 const StringRef CheckName;
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
202 const bool GetConfigPerFile;
150
anatofuz
parents:
diff changeset
203 const bool IgnoreFailedSplit;
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
204 HungarianNotation HungarianNotation;
150
anatofuz
parents:
diff changeset
205 };
anatofuz
parents:
diff changeset
206
anatofuz
parents:
diff changeset
207 } // namespace readability
221
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
208 template <>
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
209 struct OptionEnumMapping<readability::IdentifierNamingCheck::CaseType> {
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
210 static llvm::ArrayRef<
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
211 std::pair<readability::IdentifierNamingCheck::CaseType, StringRef>>
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
212 getEnumMapping();
79ff65ed7e25 LLVM12 Original
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
213 };
150
anatofuz
parents:
diff changeset
214 } // namespace tidy
anatofuz
parents:
diff changeset
215 } // namespace clang
anatofuz
parents:
diff changeset
216
anatofuz
parents:
diff changeset
217 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERNAMINGCHECK_H