[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 23 03:20:53 PDT 2017


JonasToth added a comment.

please note this enhancement in the ReleaseNotes.



================
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:93
+                      to(functionDecl(hasName("::std::make_pair"))))
+      ))))
+          .bind("make_pair"));
----------------
is the new line here necessary? i think it looks better if the `.bind` is on this line.


================
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:97
+  // make_pair can return type convertible to container's element type.
+  auto makePairCtor = ignoringImplicit(cxxConstructExpr(
+      has(materializeTemporaryExpr(makePair))));
----------------
here, on line 100 and 89: shouldnt the matchers be upper case since they are variables? Iam unsure about that.


https://reviews.llvm.org/D32395





More information about the cfe-commits mailing list