Benjamin Kramer
9589ff8949
Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
...
If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.
Call sites were found with the ASTMatcher + some semi-automated cleanup.
memberCallExpr(
argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
hasArgument(0, bindTemporaryExpr(
hasType(recordDecl(hasNonTrivialDestructor())),
has(constructExpr()))),
unless(isInTemplateInstantiation()))
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238602 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-29 19:43:39 +00:00
..
2015-05-27 18:02:19 +00:00
2015-05-11 22:41:07 +00:00
2015-05-26 17:33:15 +00:00
2015-05-06 17:12:25 +00:00
2015-05-15 21:58:42 +00:00
2015-05-26 20:17:20 +00:00
2015-05-28 19:56:34 +00:00
2015-05-27 22:14:58 +00:00
2015-05-24 16:58:59 +00:00
2015-05-20 11:37:25 +00:00
2015-05-29 19:43:39 +00:00
2015-02-15 22:54:22 +00:00
2015-05-25 01:43:23 +00:00
2015-04-02 05:02:16 +00:00
2015-05-15 09:03:15 +00:00
2015-03-03 21:16:56 +00:00
2015-04-29 16:38:44 +00:00
2015-05-20 01:07:23 +00:00
2015-03-04 01:20:33 +00:00
2015-04-11 02:11:45 +00:00
2015-02-15 22:54:22 +00:00
2015-05-05 20:14:22 +00:00
2015-04-11 02:11:45 +00:00
2015-03-04 01:15:53 +00:00
2015-05-27 05:12:39 +00:00
2015-04-11 02:11:45 +00:00
2015-02-15 22:54:22 +00:00
2015-04-11 02:11:45 +00:00
2015-05-28 23:20:35 +00:00
2015-02-15 22:54:22 +00:00
2015-04-11 02:11:45 +00:00
2015-05-29 02:56:46 +00:00
2015-04-29 16:38:44 +00:00
2015-02-15 22:54:22 +00:00
2015-03-10 16:22:52 +00:00
2015-04-29 16:38:44 +00:00
2015-04-07 12:59:28 +00:00
2015-05-06 17:05:54 +00:00
2015-04-11 02:11:45 +00:00
2015-04-11 02:11:45 +00:00
2015-04-11 15:32:26 +00:00
2015-04-03 00:18:33 +00:00
2015-04-11 02:11:45 +00:00
2015-02-15 22:54:22 +00:00
2015-04-17 16:11:05 +00:00
2015-05-28 22:41:12 +00:00
2015-05-27 18:02:19 +00:00
2015-03-01 20:39:34 +00:00
2015-04-01 21:16:02 +00:00
2015-05-22 15:38:24 +00:00
2015-03-03 20:49:08 +00:00
2015-03-05 20:04:29 +00:00
2015-03-03 21:17:00 +00:00
2015-05-29 19:43:39 +00:00
2015-05-22 05:45:19 +00:00
2015-04-28 14:05:47 +00:00
2015-05-13 23:41:47 +00:00
2015-02-15 22:00:20 +00:00
2015-05-12 23:52:24 +00:00
2015-05-21 19:20:38 +00:00
2015-05-14 18:01:13 +00:00
2015-03-01 18:10:07 +00:00
2015-04-17 16:11:05 +00:00
2015-02-15 22:54:22 +00:00
2015-05-28 22:00:24 +00:00