diff options
author | Mikhail Maltsev <mikhail.maltsev@arm.com> | 2021-01-14 13:50:16 +0000 |
---|---|---|
committer | Mikhail Maltsev <mikhail.maltsev@arm.com> | 2021-01-14 13:50:16 +0000 |
commit | 176f5e95e1afad75ff045a00f0fa9c781bd5f54a (patch) | |
tree | 8d412079bb73bd8625e544584f45a09a361ef67b /clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h | |
parent | Revert "Fix llvm::Optional build breaks in MSVC using std::is_trivially_copya... (diff) | |
download | llvm-project-176f5e95e1afad75ff045a00f0fa9c781bd5f54a.tar.gz llvm-project-176f5e95e1afad75ff045a00f0fa9c781bd5f54a.tar.bz2 llvm-project-176f5e95e1afad75ff045a00f0fa9c781bd5f54a.zip |
[clang-tidy] Use DenseSet<SourceLocation> in UpgradeDurationConversionsCheck, NFCI
This change replaces `unordered_set<unsigned>` (which used to store
internal representation of `SourceLocation`-s) with
`DenseSet<SourceLocation>` (which stores `SourceLocation`-s directly).
Reviewed By: aaron.ballman, njames93
Differential Revision: https://reviews.llvm.org/D94601
Diffstat (limited to 'clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h')
-rw-r--r-- | clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h b/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h index 7a450a8e9249..23af29299f78 100644 --- a/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h +++ b/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.h @@ -11,7 +11,8 @@ #include "../ClangTidyCheck.h" -#include <unordered_set> +#include "clang/Basic/SourceLocation.h" +#include "llvm/ADT/DenseSet.h" namespace clang { namespace tidy { @@ -32,7 +33,7 @@ public: void check(const ast_matchers::MatchFinder::MatchResult &Result) override; private: - std::unordered_set<unsigned> MatchedTemplateLocations; + llvm::DenseSet<SourceLocation> MatchedTemplateLocations; }; } // namespace abseil |