[PATCH] D32395: [clang-tidy] modernize-use-emplace: remove unnecessary make_pair calls
Piotr Padlewski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 23 04:33:19 PDT 2017
Prazek added inline comments.
================
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:93
+ to(functionDecl(hasName("::std::make_pair"))))
+ ))))
+ .bind("make_pair"));
----------------
JonasToth wrote:
> is the new line here necessary? i think it looks better if the `.bind` is on this line.
Better question is "is it clang formated?"
================
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))));
----------------
JonasToth wrote:
> here, on line 100 and 89: shouldnt the matchers be upper case since they are variables? Iam unsure about that.
True, all the matchers should have upper case, but it would be better to send it in separate patch
https://reviews.llvm.org/D32395
More information about the cfe-commits
mailing list