]> granicus.if.org Git - clang/commitdiff
Don't copy a DenseMap just to do lookup in it.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 13 Feb 2016 15:49:17 +0000 (15:49 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 13 Feb 2016 15:49:17 +0000 (15:49 +0000)
Also remove the now unused isPodLike specialization. DenseMap only uses
it for copies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@260822 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaStmt.cpp

index 836073a680c17df2cfd1df9e7946166763504396..e304965562b6961db83491cf1209bed20660afaf 100644 (file)
@@ -3531,11 +3531,6 @@ template <> struct DenseMapInfo<CatchHandlerType> {
     return LHS == RHS;
   }
 };
-
-// It's OK to treat CatchHandlerType as a POD type.
-template <> struct isPodLike<CatchHandlerType> {
-  static const bool value = true;
-};
 }
 
 namespace {
@@ -3560,7 +3555,7 @@ public:
   bool operator()(const CXXBaseSpecifier *S, CXXBasePath &) {
     if (S->getAccessSpecifier() == AccessSpecifier::AS_public) {
       CatchHandlerType Check(S->getType(), CheckAgainstPointer);
-      auto M = TypesToCheck;
+      const auto &M = TypesToCheck;
       auto I = M.find(Check);
       if (I != M.end()) {
         FoundHandler = I->second;