Skip to content

Commit

Permalink
[clang-tidy] Modernize ClangTidyValue (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Apr 26, 2023
1 parent 1ca0cb7 commit d12c471
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clang-tools-extra/clang-tidy/ClangTidyOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ struct ClangTidyOptions {

/// Helper structure for storing option value with priority of the value.
struct ClangTidyValue {
ClangTidyValue() : Value(), Priority(0) {}
ClangTidyValue(const char *Value) : Value(Value), Priority(0) {}
ClangTidyValue() = default;
ClangTidyValue(const char *Value) : Value(Value) {}
ClangTidyValue(llvm::StringRef Value, unsigned Priority = 0)
: Value(Value), Priority(Priority) {}

std::string Value;
/// Priority stores relative precedence of the value loaded from config
/// files to disambiguate local vs global value from different levels.
unsigned Priority;
unsigned Priority = 0;
};
typedef std::pair<std::string, std::string> StringPair;
typedef llvm::StringMap<ClangTidyValue> OptionMap;
Expand Down

0 comments on commit d12c471

Please sign in to comment.