Changeset View
Changeset View
Standalone View
Standalone View
clang-tidy/ClangTidyOptions.h
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | struct ClangTidyOptions { | ||||
llvm::Optional<std::string> HeaderFilterRegex; | llvm::Optional<std::string> HeaderFilterRegex; | ||||
/// \brief Output warnings from system headers matching \c HeaderFilterRegex. | /// \brief Output warnings from system headers matching \c HeaderFilterRegex. | ||||
llvm::Optional<bool> SystemHeaders; | llvm::Optional<bool> SystemHeaders; | ||||
/// \brief Turns on temporary destructor-based analysis. | /// \brief Turns on temporary destructor-based analysis. | ||||
llvm::Optional<bool> AnalyzeTemporaryDtors; | llvm::Optional<bool> AnalyzeTemporaryDtors; | ||||
/// \brief Turns on experimental alpha checkers from the static analyzer. | |||||
llvm::Optional<bool> AllowEnablingAlphaChecks; | |||||
alexfh: Since this will only be configurable via a flag, this option will be global (i.e. not depend on… | |||||
pfultz2AuthorUnsubmitted Not Done ReplyInline ActionsBut it needs to be passed to getCheckNames as well, which doesn't take a ClangTidyContext. pfultz2: But it needs to be passed to `getCheckNames` as well, which doesn't take a `ClangTidyContext`. | |||||
alexfhUnsubmitted Not Done ReplyInline ActionsWe can add a boolean parameter to getCheckNames. ClangTidyASTConsumerFactory could get this as a constructor parameter or from ClangTidyContext. alexfh: We can add a boolean parameter to `getCheckNames`. `ClangTidyASTConsumerFactory` could get this… | |||||
/// \brief Format code around applied fixes with clang-format using this | /// \brief Format code around applied fixes with clang-format using this | ||||
/// style. | /// style. | ||||
/// | /// | ||||
/// Can be one of: | /// Can be one of: | ||||
/// * 'none' - don't format code around applied fixes; | /// * 'none' - don't format code around applied fixes; | ||||
/// * 'llvm', 'google', 'mozilla' or other predefined clang-format style | /// * 'llvm', 'google', 'mozilla' or other predefined clang-format style | ||||
/// names; | /// names; | ||||
/// * 'file' - use the .clang-format file in the closest parent directory of | /// * 'file' - use the .clang-format file in the closest parent directory of | ||||
▲ Show 20 Lines • Show All 191 Lines • Show Last 20 Lines |
Since this will only be configurable via a flag, this option will be global (i.e. not depend on the location of the file being analyzed). I'd suggest to remove this option altogether and use something else to pass it to ClangTidyASTConsumerFactory. It could be stashed into ClangTidyASTConsumerFactory and passed as a parameter of runClangTidy, or it could live in ClangTidyContext.