Go to file
David Blaikie 0c4dbf9ecd Assigning to a local object in a return statement prevents copy elision. NFC.
I added a diagnostic along the lines of `-Wpessimizing-move` to detect `return x = y` suppressing copy elision, but I don't know if the diagnostic is really worth it. Anyway, here are the places where my diagnostic reported that copy elision would have been possible if not for the assignment.

P1155R1 in the post-San-Diego WG21 (C++ committee) mailing discusses whether WG21 should fix this pitfall by just changing the core language to permit copy elision in cases like these.

(Kona update: The bulk of P1155 is proceeding to CWG review, but specifically *not* the parts that explored the notion of permitting copy-elision in these specific cases.)

Reviewed By: dblaikie

Author: Arthur O'Dwyer

Differential Revision: https://reviews.llvm.org/D54885

llvm-svn: 359236
2019-04-25 20:09:00 +00:00
clang Skip type units/type uniquing when we know we're only emitting the type once (vtable-based emission when triggered by a strong vtable, with -fno-standalone-debug) 2019-04-25 20:05:47 +00:00
clang-tools-extra [clangd] Optimize "don't include me" check. 2019-04-25 17:47:07 +00:00
compiler-rt [libFuzzer] Require linux for libcxx.test 2019-04-25 18:42:30 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add LLVM-8 build 2019-03-27 21:28:31 +00:00
libcxx Remove libc++ checks and workarounds for unsupported old versions of GCC (<4.9). 2019-04-25 20:02:10 +00:00
libcxxabi Fix compilation error with -DLIBCXXABI_ENABLE_THREADS=OFF 2019-04-25 09:27:50 +00:00
libunwind [NFC] Fix typo in debug log 2019-04-22 15:40:50 +00:00
lld [WebAssembly] Always take into account added when applying runtime relocations 2019-04-25 17:11:54 +00:00
lldb Two tests were using the interactive convenience variable 2019-04-25 20:03:39 +00:00
llgo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
llvm Assigning to a local object in a return statement prevents copy elision. NFC. 2019-04-25 20:09:00 +00:00
openmp Use correct way to test for MIPS arch after rOMP355687 2019-04-22 19:20:46 +00:00
parallel-libs Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
polly Apply include-what-you-use #include removal suggestions. NFC. 2019-03-28 20:19:49 +00:00
pstl [pstl] Make the default backend be the serial backend and always provide parallel policies 2019-04-24 20:12:36 +00:00
.arcconfig Update monorepo .arcconfig with new project callsign. 2019-01-31 14:34:59 +00:00
.clang-format Add .clang-tidy and .clang-format files to the toplevel of the 2019-01-29 16:43:16 +00:00
.clang-tidy Disable tidy checks with too many hits 2019-02-01 11:20:13 +00:00
.gitignore Add a reduced copy of the llvm .gitignore 2019-04-09 00:52:49 +00:00
README.md

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.