corona10 updated this revision to Diff 455536.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132640/new/

https://reviews.llvm.org/D132640

Files:
  clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp


Index: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
===================================================================
--- clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
+++ clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
@@ -132,17 +132,20 @@
   // because this requires special treatment (it could cause performance
   // regression)
   // + match for emplace calls that should be replaced with insertion
-  auto CallPushBack = cxxMemberCallExpr(
-      hasDeclaration(functionDecl(hasName("push_back"))),
-      on(hasType(cxxRecordDecl(hasAnyName(ContainersWithPushBack)))));
-
-  auto CallPush = cxxMemberCallExpr(
-      hasDeclaration(functionDecl(hasName("push"))),
-      on(hasType(cxxRecordDecl(hasAnyName(ContainersWithPush)))));
-
-  auto CallPushFront = cxxMemberCallExpr(
-      hasDeclaration(functionDecl(hasName("push_front"))),
-      on(hasType(cxxRecordDecl(hasAnyName(ContainersWithPushFront)))));
+  auto CallPushBack =
+      cxxMemberCallExpr(hasDeclaration(functionDecl(hasName("push_back"))),
+                        on(hasType(hasCanonicalType(hasDeclaration(
+                            namedDecl(hasAnyName(ContainersWithPushBack)))))));
+
+  auto CallPush =
+      cxxMemberCallExpr(hasDeclaration(functionDecl(hasName("push"))),
+                        on(hasType(hasCanonicalType(hasDeclaration(
+                            namedDecl(hasAnyName(ContainersWithPush)))))));
+
+  auto CallPushFront =
+      cxxMemberCallExpr(hasDeclaration(functionDecl(hasName("push_front"))),
+                        on(hasType(hasCanonicalType(hasDeclaration(
+                            
namedDecl(hasAnyName(ContainersWithPushFront)))))));
 
   auto CallEmplacy = cxxMemberCallExpr(
       hasDeclaration(


Index: clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
===================================================================
--- clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
+++ clang-tools-extra/clang-tidy/modernize/UseEmplaceCheck.cpp
@@ -132,17 +132,20 @@
   // because this requires special treatment (it could cause performance
   // regression)
   // + match for emplace calls that should be replaced with insertion
-  auto CallPushBack = cxxMemberCallExpr(
-      hasDeclaration(functionDecl(hasName("push_back"))),
-      on(hasType(cxxRecordDecl(hasAnyName(ContainersWithPushBack)))));
-
-  auto CallPush = cxxMemberCallExpr(
-      hasDeclaration(functionDecl(hasName("push"))),
-      on(hasType(cxxRecordDecl(hasAnyName(ContainersWithPush)))));
-
-  auto CallPushFront = cxxMemberCallExpr(
-      hasDeclaration(functionDecl(hasName("push_front"))),
-      on(hasType(cxxRecordDecl(hasAnyName(ContainersWithPushFront)))));
+  auto CallPushBack =
+      cxxMemberCallExpr(hasDeclaration(functionDecl(hasName("push_back"))),
+                        on(hasType(hasCanonicalType(hasDeclaration(
+                            namedDecl(hasAnyName(ContainersWithPushBack)))))));
+
+  auto CallPush =
+      cxxMemberCallExpr(hasDeclaration(functionDecl(hasName("push"))),
+                        on(hasType(hasCanonicalType(hasDeclaration(
+                            namedDecl(hasAnyName(ContainersWithPush)))))));
+
+  auto CallPushFront =
+      cxxMemberCallExpr(hasDeclaration(functionDecl(hasName("push_front"))),
+                        on(hasType(hasCanonicalType(hasDeclaration(
+                            namedDecl(hasAnyName(ContainersWithPushFront)))))));
 
   auto CallEmplacy = cxxMemberCallExpr(
       hasDeclaration(
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to