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
dsymutil AsmPrinter: Rename begin_values() => values_begin(), NFC 2015-05-28 18:55:38 +00:00
gold
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
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
llvm-go
llvm-jitlistener Prune CRLFs. 2015-05-25 01:43:23 +00:00
llvm-link
llvm-lto
llvm-mc
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
llvm-size
llvm-stress
llvm-symbolizer
lto
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
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