llvm-6502/tools
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
..
bugpoint Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
bugpoint-passes bugpoint Enhancement. 2015-04-20 23:42:22 +00:00
dsymutil AsmPrinter: Rename begin_values() => values_begin(), NFC 2015-05-28 18:55:38 +00:00
gold Fix build error from r234957 2015-04-15 00:13:51 +00:00
llc Resubmit r237954 (MIR Serialization: print and parse LLVM IR using MIR format). 2015-05-27 18:02:19 +00:00
lli Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
llvm-ar
llvm-as Fix input validation issues in llvm-as/llvm-dis 2015-05-11 21:20:20 +00:00
llvm-bcanalyzer [llvm-bcanalyzer] Add -show-binary-blobs option. 2015-05-13 18:51:49 +00:00
llvm-c-test
llvm-config
llvm-cov Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
llvm-cxxdump Change range-based for-loop to use const auto&. No functionality change. 2015-04-15 03:17:49 +00:00
llvm-diff
llvm-dis Fix input validation issues in llvm-as/llvm-dis 2015-05-11 21:20:20 +00:00
llvm-dwarfdump Add llvm-dwarfdump-fuzzer that uses LibFuzzer to fuzz llvm-dwarfdump tool. 2015-05-28 18:35:18 +00:00
llvm-extract uselistorder: Remove the global bits 2015-04-15 03:14:06 +00:00
llvm-go
llvm-jitlistener Prune CRLFs. 2015-05-25 01:43:23 +00:00
llvm-link Linker: Add flag to override linkage rules 2015-04-22 04:11:00 +00:00
llvm-lto
llvm-mc Add targets to cmake for specific target components. 2015-04-20 18:22:05 +00:00
llvm-mcmarkup
llvm-nm Fix llvm-nm -S option. 2015-05-22 13:28:35 +00:00
llvm-objdump [Objdump] Removing unused parameter. 2015-05-29 14:48:25 +00:00
llvm-pdbdump Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:43:39 +00:00
llvm-profdata
llvm-readobj [llvm-readobj/ELF] Teach how to decode DF_1_XXX flags 2015-05-25 19:12:18 +00:00
llvm-rtdyld Make it easier to use DwarfContext with MCJIT 2015-05-21 21:24:32 +00:00
llvm-shlib Updating symbol wildcards one more time. 2015-04-16 21:58:22 +00:00
llvm-size
llvm-stress
llvm-symbolizer A few fixes for llvm-symbolizer on Windows. 2015-05-06 22:26:30 +00:00
lto LTO: Add API to choose whether to embed uselists 2015-04-27 23:38:54 +00:00
macho-dump
msbuild
obj2yaml [obj2yaml/yaml2obj] Add SHT_MIPS_ABIFLAGS section support 2015-05-07 15:40:48 +00:00
opt Remove NoFramePointerElim and NoFramePointerElimOverride from TargetOptions and 2015-05-26 20:17:20 +00:00
verify-uselistorder uselistorder: Pull the assembly bit up out of the printer 2015-04-15 02:12:41 +00:00
yaml2obj [yaml2elf] Replace error message by assert call in writeSectionContent methods 2015-05-08 07:05:04 +00:00
CMakeLists.txt
LLVMBuild.txt Reflow long lines of some LLVMBuild files 2015-05-14 15:38:27 +00:00
Makefile