summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2017-10-10 07:21:51 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2017-10-10 07:21:51 +0000
commit252dd8b745c889c2c1523e1f473033e835f20dd5 (patch)
treeaa21bd64ae7cd1042fc7d51540c2ef4a13024b8f
parentdb4818ec01f2c7ab001b808e03d66e5ac0af7872 (diff)
downloadbcm5719-llvm-252dd8b745c889c2c1523e1f473033e835f20dd5.tar.gz
bcm5719-llvm-252dd8b745c889c2c1523e1f473033e835f20dd5.zip
[clang-tidy] Use a more efficient map for the virtual near miss check.
DenseMap performs better here. No functionality change intended. llvm-svn: 315277
-rw-r--r--clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.h b/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.h
index 4e108f22ce3..3d3b9eba762 100644
--- a/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.h
+++ b/clang-tools-extra/clang-tidy/misc/VirtualNearMissCheck.h
@@ -11,7 +11,7 @@
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MISC_VIRTUAL_NEAR_MISS_H
#include "../ClangTidy.h"
-#include <map>
+#include "llvm/ADT/DenseMap.h"
namespace clang {
namespace tidy {
@@ -47,12 +47,12 @@ private:
/// Key: the unique ID of a method.
/// Value: whether the method is possible to be overridden.
- std::map<const CXXMethodDecl *, bool> PossibleMap;
+ llvm::DenseMap<const CXXMethodDecl *, bool> PossibleMap;
/// Key: <unique ID of base method, name of derived class>
/// Value: whether the base method is overridden by some method in the derived
/// class.
- std::map<std::pair<const CXXMethodDecl *, const CXXRecordDecl *>, bool>
+ llvm::DenseMap<std::pair<const CXXMethodDecl *, const CXXRecordDecl *>, bool>
OverriddenMap;
const unsigned EditDistanceThreshold = 1;
OpenPOWER on IntegriCloud