clang-tools  11.0.0
ClangTidyOptions.h
Go to the documentation of this file.
1 //===--- ClangTidyOptions.h - clang-tidy ------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYOPTIONS_H
10 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYOPTIONS_H
11 
12 #include "llvm/ADT/IntrusiveRefCntPtr.h"
13 #include "llvm/ADT/Optional.h"
14 #include "llvm/ADT/StringMap.h"
15 #include "llvm/ADT/StringRef.h"
16 #include "llvm/Support/ErrorOr.h"
17 #include "llvm/Support/VirtualFileSystem.h"
18 #include <functional>
19 #include <map>
20 #include <string>
21 #include <system_error>
22 #include <utility>
23 #include <vector>
24 
25 namespace clang {
26 namespace tidy {
27 
28 /// Contains a list of line ranges in a single file.
29 struct FileFilter {
30  /// File name.
31  std::string Name;
32 
33  /// LineRange is a pair<start, end> (inclusive).
34  typedef std::pair<unsigned, unsigned> LineRange;
35 
36  /// A list of line ranges in this file, for which we show warnings.
37  std::vector<LineRange> LineRanges;
38 };
39 
40 /// Global options. These options are neither stored nor read from
41 /// configuration files.
43  /// Output warnings from certain line ranges of certain files only.
44  /// If empty, no warnings will be filtered.
45  std::vector<FileFilter> LineFilter;
46 };
47 
48 /// Contains options for clang-tidy. These options may be read from
49 /// configuration files, and may be different for different translation units.
51  /// These options are used for all settings that haven't been
52  /// overridden by the \c OptionsProvider.
53  ///
54  /// Allow no checks and no headers by default. This method initializes
55  /// check-specific options by calling \c ClangTidyModule::getModuleOptions()
56  /// of each registered \c ClangTidyModule.
58 
59  /// Creates a new \c ClangTidyOptions instance combined from all fields
60  /// of this instance overridden by the fields of \p Other that have a value.
61  /// \p Order specifies precedence of \p Other option.
63  unsigned Order) const;
64 
65  /// Checks filter.
66  llvm::Optional<std::string> Checks;
67 
68  /// WarningsAsErrors filter.
69  llvm::Optional<std::string> WarningsAsErrors;
70 
71  /// Output warnings from headers matching this filter. Warnings from
72  /// main files will always be displayed.
73  llvm::Optional<std::string> HeaderFilterRegex;
74 
75  /// Output warnings from system headers matching \c HeaderFilterRegex.
76  llvm::Optional<bool> SystemHeaders;
77 
78  /// Format code around applied fixes with clang-format using this
79  /// style.
80  ///
81  /// Can be one of:
82  /// * 'none' - don't format code around applied fixes;
83  /// * 'llvm', 'google', 'mozilla' or other predefined clang-format style
84  /// names;
85  /// * 'file' - use the .clang-format file in the closest parent directory of
86  /// each source file;
87  /// * '{inline-formatting-style-in-yaml-format}'.
88  ///
89  /// See clang-format documentation for more about configuring format style.
90  llvm::Optional<std::string> FormatStyle;
91 
92  /// Specifies the name or e-mail of the user running clang-tidy.
93  ///
94  /// This option is used, for example, to place the correct user name in TODO()
95  /// comments in the relevant check.
96  llvm::Optional<std::string> User;
97 
98  /// Helper structure for storing option value with priority of the value.
99  struct ClangTidyValue {
101  ClangTidyValue(const char *Value) : Value(Value), Priority(0) {}
102  ClangTidyValue(llvm::StringRef Value, unsigned Priority = 0)
103  : Value(Value), Priority(Priority) {}
104 
105  std::string Value;
106  /// Priority stores relative precedence of the value loaded from config
107  /// files to disambigute local vs global value from different levels.
108  unsigned Priority;
109  };
110  typedef std::pair<std::string, std::string> StringPair;
111  typedef std::map<std::string, ClangTidyValue> OptionMap;
112 
113  /// Key-value mapping used to store check-specific options.
115 
116  typedef std::vector<std::string> ArgList;
117 
118  /// Add extra compilation arguments to the end of the list.
119  llvm::Optional<ArgList> ExtraArgs;
120 
121  /// Add extra compilation arguments to the start of the list.
122  llvm::Optional<ArgList> ExtraArgsBefore;
123 
124  /// Only used in the FileOptionsProvider and ConfigOptionsProvider. If true
125  /// and using a FileOptionsProvider, it will take a configuration file in the
126  /// parent directory (if any exists) and apply this config file on top of the
127  /// parent one. IF true and using a ConfigOptionsProvider, it will apply this
128  /// config on top of any configuation file it finds in the directory using the
129  /// same logic as FileOptionsProvider. If false or missing, only this
130  /// configuration file will be used.
131  llvm::Optional<bool> InheritParentConfig;
132 
133  /// Use colors in diagnostics. If missing, it will be auto detected.
134  llvm::Optional<bool> UseColor;
135 };
136 
137 /// Abstract interface for retrieving various ClangTidy options.
139 public:
140  static const char OptionsSourceTypeDefaultBinary[];
143 
145 
146  /// Returns global options, which are independent of the file.
147  virtual const ClangTidyGlobalOptions &getGlobalOptions() = 0;
148 
149  /// ClangTidyOptions and its source.
150  //
151  /// clang-tidy has 3 types of the sources in order of increasing priority:
152  /// * clang-tidy binary.
153  /// * '-config' commandline option or a specific configuration file. If the
154  /// commandline option is specified, clang-tidy will ignore the
155  /// configuration file.
156  /// * '-checks' commandline option.
157  typedef std::pair<ClangTidyOptions, std::string> OptionsSource;
158 
159  /// Returns an ordered vector of OptionsSources, in order of increasing
160  /// priority.
161  virtual std::vector<OptionsSource>
162  getRawOptions(llvm::StringRef FileName) = 0;
163 
164  /// Returns options applying to a specific translation unit with the
165  /// specified \p FileName.
166  ClangTidyOptions getOptions(llvm::StringRef FileName);
167 };
168 
169 /// Implementation of the \c ClangTidyOptionsProvider interface, which
170 /// returns the same options for all files.
172 public:
174  const ClangTidyOptions &Options)
175  : GlobalOptions(GlobalOptions), DefaultOptions(Options) {}
177  return GlobalOptions;
178  }
179  std::vector<OptionsSource> getRawOptions(llvm::StringRef FileName) override;
180 
181 private:
182  ClangTidyGlobalOptions GlobalOptions;
183  ClangTidyOptions DefaultOptions;
184 };
185 
187 public:
188  // A pair of configuration file base name and a function parsing
189  // configuration from text in the corresponding format.
190  typedef std::pair<std::string, std::function<llvm::ErrorOr<ClangTidyOptions>(
191  llvm::StringRef)>>
193 
194  /// Configuration file handlers listed in the order of priority.
195  ///
196  /// Custom configuration file formats can be supported by constructing the
197  /// list of handlers and passing it to the appropriate \c FileOptionsProvider
198  /// constructor. E.g. initialization of a \c FileOptionsProvider with support
199  /// of a custom configuration file format for files named ".my-tidy-config"
200  /// could look similar to this:
201  /// \code
202  /// FileOptionsProvider::ConfigFileHandlers ConfigHandlers;
203  /// ConfigHandlers.emplace_back(".my-tidy-config", parseMyConfigFormat);
204  /// ConfigHandlers.emplace_back(".clang-tidy", parseConfiguration);
205  /// return std::make_unique<FileOptionsProvider>(
206  /// GlobalOptions, DefaultOptions, OverrideOptions, ConfigHandlers);
207  /// \endcode
208  ///
209  /// With the order of handlers shown above, the ".my-tidy-config" file would
210  /// take precedence over ".clang-tidy" if both reside in the same directory.
211  typedef std::vector<ConfigFileHandler> ConfigFileHandlers;
212 
214  const ClangTidyGlobalOptions &GlobalOptions,
215  const ClangTidyOptions &DefaultOptions,
217  llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS = nullptr);
218 
219  FileOptionsBaseProvider(const ClangTidyGlobalOptions &GlobalOptions,
220  const ClangTidyOptions &DefaultOptions,
223 
224 protected:
225  void addRawFileOptions(llvm::StringRef AbsolutePath,
226  std::vector<OptionsSource> &CurOptions);
227 
228  /// Try to read configuration files from \p Directory using registered
229  /// \c ConfigHandlers.
230  llvm::Optional<OptionsSource> tryReadConfigFile(llvm::StringRef Directory);
231 
232  llvm::StringMap<OptionsSource> CachedOptions;
235  llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS;
236 };
237 
238 /// Implementation of ClangTidyOptions interface, which is used for
239 /// '-config' command-line option.
241 public:
243  const ClangTidyGlobalOptions &GlobalOptions,
244  const ClangTidyOptions &DefaultOptions,
245  const ClangTidyOptions &ConfigOptions,
247  llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS = nullptr);
248  std::vector<OptionsSource> getRawOptions(llvm::StringRef FileName) override;
249 
250 private:
251  ClangTidyOptions ConfigOptions;
252 };
253 
254 /// Implementation of the \c ClangTidyOptionsProvider interface, which
255 /// tries to find a configuration file in the closest parent directory of each
256 /// source file.
257 ///
258 /// By default, files named ".clang-tidy" will be considered, and the
259 /// \c clang::tidy::parseConfiguration function will be used for parsing, but a
260 /// custom set of configuration file names and parsing functions can be
261 /// specified using the appropriate constructor.
263 public:
264  /// Initializes the \c FileOptionsProvider instance.
265  ///
266  /// \param GlobalOptions are just stored and returned to the caller of
267  /// \c getGlobalOptions.
268  ///
269  /// \param DefaultOptions are used for all settings not specified in a
270  /// configuration file.
271  ///
272  /// If any of the \param OverrideOptions fields are set, they will override
273  /// whatever options are read from the configuration file.
275  const ClangTidyGlobalOptions &GlobalOptions,
276  const ClangTidyOptions &DefaultOptions,
278  llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS = nullptr);
279 
280  /// Initializes the \c FileOptionsProvider instance with a custom set
281  /// of configuration file handlers.
282  ///
283  /// \param GlobalOptions are just stored and returned to the caller of
284  /// \c getGlobalOptions.
285  ///
286  /// \param DefaultOptions are used for all settings not specified in a
287  /// configuration file.
288  ///
289  /// If any of the \param OverrideOptions fields are set, they will override
290  /// whatever options are read from the configuration file.
291  ///
292  /// \param ConfigHandlers specifies a custom set of configuration file
293  /// handlers. Each handler is a pair of configuration file name and a function
294  /// that can parse configuration from this file type. The configuration files
295  /// in each directory are searched for in the order of appearance in
296  /// \p ConfigHandlers.
297  FileOptionsProvider(const ClangTidyGlobalOptions &GlobalOptions,
298  const ClangTidyOptions &DefaultOptions,
301 
302  std::vector<OptionsSource> getRawOptions(llvm::StringRef FileName) override;
303 };
304 
305 /// Parses LineFilter from JSON and stores it to the \p Options.
306 std::error_code parseLineFilter(llvm::StringRef LineFilter,
307  ClangTidyGlobalOptions &Options);
308 
309 /// Parses configuration from JSON and returns \c ClangTidyOptions or an
310 /// error.
311 llvm::ErrorOr<ClangTidyOptions> parseConfiguration(llvm::StringRef Config);
312 
313 /// Serializes configuration to a YAML-encoded string.
314 std::string configurationAsText(const ClangTidyOptions &Options);
315 
316 } // end namespace tidy
317 } // end namespace clang
318 
319 #endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYOPTIONS_H
clang::tidy::ConfigOptionsProvider::ConfigOptionsProvider
ConfigOptionsProvider(const ClangTidyGlobalOptions &GlobalOptions, const ClangTidyOptions &DefaultOptions, const ClangTidyOptions &ConfigOptions, const ClangTidyOptions &OverrideOptions, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS=nullptr)
Definition: ClangTidyOptions.cpp:193
clang::tidy::DefaultOptionsProvider::getRawOptions
std::vector< OptionsSource > getRawOptions(llvm::StringRef FileName) override
Returns an ordered vector of OptionsSources, in order of increasing priority.
Definition: ClangTidyOptions.cpp:187
clang::tidy::DefaultOptionsProvider
Implementation of the ClangTidyOptionsProvider interface, which returns the same options for all file...
Definition: ClangTidyOptions.h:171
clang::tidy::ClangTidyOptions::Checks
llvm::Optional< std::string > Checks
Checks filter.
Definition: ClangTidyOptions.h:66
clang::tidy::ClangTidyOptions::ClangTidyValue::Priority
unsigned Priority
Priority stores relative precedence of the value loaded from config files to disambigute local vs glo...
Definition: ClangTidyOptions.h:108
clang::tidy::FileOptionsBaseProvider::ConfigHandlers
ConfigFileHandlers ConfigHandlers
Definition: ClangTidyOptions.h:234
clang::tidy::DefaultOptionsProvider::DefaultOptionsProvider
DefaultOptionsProvider(const ClangTidyGlobalOptions &GlobalOptions, const ClangTidyOptions &Options)
Definition: ClangTidyOptions.h:173
clang::tidy::ClangTidyOptionsProvider
Abstract interface for retrieving various ClangTidy options.
Definition: ClangTidyOptions.h:138
clang::tidy::parseLineFilter
std::error_code parseLineFilter(StringRef LineFilter, clang::tidy::ClangTidyGlobalOptions &Options)
Parses -line-filter option and stores it to the Options.
Definition: ClangTidyOptions.cpp:372
clang::tidy::ClangTidyOptions::ClangTidyValue::ClangTidyValue
ClangTidyValue(llvm::StringRef Value, unsigned Priority=0)
Definition: ClangTidyOptions.h:102
clang::tidy::ClangTidyOptions::ArgList
std::vector< std::string > ArgList
Definition: ClangTidyOptions.h:116
clang::tidy::ClangTidyOptionsProvider::OptionsSourceTypeCheckCommandLineOption
static const char OptionsSourceTypeCheckCommandLineOption[]
Definition: ClangTidyOptions.h:141
clang::tidy::FileOptionsBaseProvider::addRawFileOptions
void addRawFileOptions(llvm::StringRef AbsolutePath, std::vector< OptionsSource > &CurOptions)
Definition: ClangTidyOptions.cpp:245
clang::tidy::ClangTidyOptions::ClangTidyValue
Helper structure for storing option value with priority of the value.
Definition: ClangTidyOptions.h:99
clang::tidy::FileFilter
Contains a list of line ranges in a single file.
Definition: ClangTidyOptions.h:29
clang::tidy::ClangTidyOptions::ExtraArgsBefore
llvm::Optional< ArgList > ExtraArgsBefore
Add extra compilation arguments to the start of the list.
Definition: ClangTidyOptions.h:122
clang::tidy::FileFilter::LineRanges
std::vector< LineRange > LineRanges
A list of line ranges in this file, for which we show warnings.
Definition: ClangTidyOptions.h:37
clang::tidy::ClangTidyOptions::User
llvm::Optional< std::string > User
Specifies the name or e-mail of the user running clang-tidy.
Definition: ClangTidyOptions.h:96
clang::tidy::ClangTidyOptions::CheckOptions
OptionMap CheckOptions
Key-value mapping used to store check-specific options.
Definition: ClangTidyOptions.h:114
clang::tidy::ClangTidyOptions
Contains options for clang-tidy.
Definition: ClangTidyOptions.h:50
clang::tidy::ClangTidyOptionsProvider::OptionsSourceTypeDefaultBinary
static const char OptionsSourceTypeDefaultBinary[]
Definition: ClangTidyOptions.h:140
clang::tidy::ClangTidyOptions::InheritParentConfig
llvm::Optional< bool > InheritParentConfig
Only used in the FileOptionsProvider and ConfigOptionsProvider.
Definition: ClangTidyOptions.h:131
clang::tidy::DefaultOptionsProvider::getGlobalOptions
const ClangTidyGlobalOptions & getGlobalOptions() override
Returns global options, which are independent of the file.
Definition: ClangTidyOptions.h:176
clang::tidy::ClangTidyOptions::FormatStyle
llvm::Optional< std::string > FormatStyle
Format code around applied fixes with clang-format using this style.
Definition: ClangTidyOptions.h:90
clang::tidy::ClangTidyOptions::UseColor
llvm::Optional< bool > UseColor
Use colors in diagnostics. If missing, it will be auto detected.
Definition: ClangTidyOptions.h:134
clang::tidy::FileOptionsProvider
Implementation of the ClangTidyOptionsProvider interface, which tries to find a configuration file in...
Definition: ClangTidyOptions.h:262
clang::tidy::ClangTidyOptionsProvider::OptionsSource
std::pair< ClangTidyOptions, std::string > OptionsSource
ClangTidyOptions and its source.
Definition: ClangTidyOptions.h:157
clang::tidy::ClangTidyOptions::HeaderFilterRegex
llvm::Optional< std::string > HeaderFilterRegex
Output warnings from headers matching this filter.
Definition: ClangTidyOptions.h:73
clang::tidy::ClangTidyOptions::SystemHeaders
llvm::Optional< bool > SystemHeaders
Output warnings from system headers matching HeaderFilterRegex.
Definition: ClangTidyOptions.h:76
clang::tidy::FileOptionsBaseProvider
Definition: ClangTidyOptions.h:186
clang::tidy::FileOptionsProvider::FileOptionsProvider
FileOptionsProvider(const ClangTidyGlobalOptions &GlobalOptions, const ClangTidyOptions &DefaultOptions, const ClangTidyOptions &OverrideOptions, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS=nullptr)
Initializes the FileOptionsProvider instance.
Definition: ClangTidyOptions.cpp:284
clang::tidy::ClangTidyGlobalOptions::LineFilter
std::vector< FileFilter > LineFilter
Output warnings from certain line ranges of certain files only.
Definition: ClangTidyOptions.h:45
clang::tidy::FileOptionsBaseProvider::FS
llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS
Definition: ClangTidyOptions.h:235
clang::tidy::FileOptionsProvider::getRawOptions
std::vector< OptionsSource > getRawOptions(llvm::StringRef FileName) override
Returns an ordered vector of OptionsSources, in order of increasing priority.
Definition: ClangTidyOptions.cpp:304
clang::tidy::parseConfiguration
llvm::ErrorOr< ClangTidyOptions > parseConfiguration(StringRef Config)
Definition: ClangTidyOptions.cpp:379
clang::tidy::ClangTidyOptions::ClangTidyValue::ClangTidyValue
ClangTidyValue()
Definition: ClangTidyOptions.h:100
Directory
llvm::StringRef Directory
Definition: Serialization.cpp:387
clang::tidy::ClangTidyOptionsProvider::getGlobalOptions
virtual const ClangTidyGlobalOptions & getGlobalOptions()=0
Returns global options, which are independent of the file.
clang::tidy::FileOptionsBaseProvider::CachedOptions
llvm::StringMap< OptionsSource > CachedOptions
Definition: ClangTidyOptions.h:232
clang::tidy::configurationAsText
std::string configurationAsText(const ClangTidyOptions &Options)
Serializes configuration to a YAML-encoded string.
Definition: ClangTidyOptions.cpp:388
clang::tidy::FileOptionsBaseProvider::tryReadConfigFile
llvm::Optional< OptionsSource > tryReadConfigFile(llvm::StringRef Directory)
Try to read configuration files from Directory using registered ConfigHandlers.
Definition: ClangTidyOptions.cpp:325
clang::tidy::ClangTidyOptionsProvider::OptionsSourceTypeConfigCommandLineOption
static const char OptionsSourceTypeConfigCommandLineOption[]
Definition: ClangTidyOptions.h:142
clang::tidy::FileOptionsBaseProvider::FileOptionsBaseProvider
FileOptionsBaseProvider(const ClangTidyGlobalOptions &GlobalOptions, const ClangTidyOptions &DefaultOptions, const ClangTidyOptions &OverrideOptions, llvm::IntrusiveRefCntPtr< llvm::vfs::FileSystem > FS=nullptr)
Definition: ClangTidyOptions.cpp:225
Config
static cl::opt< std::string > Config("config", cl::desc(R"( Specifies a configuration in YAML/JSON format: -config="{Checks:' *', CheckOptions:[{key:x, value:y}]}" When the value is empty, clang-tidy will attempt to find a file named .clang-tidy for each source file in its parent directories. )"), cl::init(""), cl::cat(ClangTidyCategory))
clang::tidy::ClangTidyGlobalOptions
Global options.
Definition: ClangTidyOptions.h:42
clang::tidy::ClangTidyOptions::WarningsAsErrors
llvm::Optional< std::string > WarningsAsErrors
WarningsAsErrors filter.
Definition: ClangTidyOptions.h:69
clang::tidy::ConfigOptionsProvider
Implementation of ClangTidyOptions interface, which is used for '-config' command-line option.
Definition: ClangTidyOptions.h:240
clang::tidy::FileFilter::Name
std::string Name
File name.
Definition: ClangTidyOptions.h:31
clang::tidy::ClangTidyOptionsProvider::getOptions
ClangTidyOptions getOptions(llvm::StringRef FileName)
Returns options applying to a specific translation unit with the specified FileName.
Definition: ClangTidyOptions.cpp:178
clang::tidy::FileOptionsBaseProvider::ConfigFileHandlers
std::vector< ConfigFileHandler > ConfigFileHandlers
Configuration file handlers listed in the order of priority.
Definition: ClangTidyOptions.h:211
clang::tidy::FileOptionsBaseProvider::ConfigFileHandler
std::pair< std::string, std::function< llvm::ErrorOr< ClangTidyOptions > llvm::StringRef)> > ConfigFileHandler
Definition: ClangTidyOptions.h:192
LineFilter
static cl::opt< std::string > LineFilter("line-filter", cl::desc(R"( List of files with line ranges to filter the warnings. Can be used together with -header-filter. The format of the list is a JSON array of objects: [ {"name":"file1.cpp","lines":[[1,3],[5,7]]}, {"name":"file2.h"} ] )"), cl::init(""), cl::cat(ClangTidyCategory))
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ApplyReplacements.h:27
clang::tidy::FileFilter::LineRange
std::pair< unsigned, unsigned > LineRange
LineRange is a pair<start, end> (inclusive).
Definition: ClangTidyOptions.h:34
clang::tidy::ClangTidyOptionsProvider::getRawOptions
virtual std::vector< OptionsSource > getRawOptions(llvm::StringRef FileName)=0
Returns an ordered vector of OptionsSources, in order of increasing priority.
clang::tidy::ClangTidyOptions::ClangTidyValue::Value
std::string Value
Definition: ClangTidyOptions.h:105
clang::tidy::FileOptionsBaseProvider::OverrideOptions
ClangTidyOptions OverrideOptions
Definition: ClangTidyOptions.h:233
clang::tidy::ClangTidyOptionsProvider::~ClangTidyOptionsProvider
virtual ~ClangTidyOptionsProvider()
Definition: ClangTidyOptions.h:144
clang::tidy::ClangTidyOptions::mergeWith
ClangTidyOptions mergeWith(const ClangTidyOptions &Other, unsigned Order) const
Creates a new ClangTidyOptions instance combined from all fields of this instance overridden by the f...
Definition: ClangTidyOptions.cpp:147
clang::tidy::ClangTidyOptions::ClangTidyValue::ClangTidyValue
ClangTidyValue(const char *Value)
Definition: ClangTidyOptions.h:101
FileName
PathRef FileName
Definition: CodeComplete.cpp:1043
clang::tidy::ClangTidyOptions::getDefaults
static ClangTidyOptions getDefaults()
These options are used for all settings that haven't been overridden by the OptionsProvider.
Definition: ClangTidyOptions.cpp:109
clang::tidy::ConfigOptionsProvider::getRawOptions
std::vector< OptionsSource > getRawOptions(llvm::StringRef FileName) override
Returns an ordered vector of OptionsSources, in order of increasing priority.
Definition: ClangTidyOptions.cpp:204
clang::tidy::ClangTidyOptions::ExtraArgs
llvm::Optional< ArgList > ExtraArgs
Add extra compilation arguments to the end of the list.
Definition: ClangTidyOptions.h:119
clang::tidy::ClangTidyOptions::StringPair
std::pair< std::string, std::string > StringPair
Definition: ClangTidyOptions.h:110
clang::tidy::ClangTidyOptions::OptionMap
std::map< std::string, ClangTidyValue > OptionMap
Definition: ClangTidyOptions.h:111