[PATCH] D43898: Preliminary refactoring in service of -Wreturn-std-move. NFC.

Arthur O'Dwyer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 28 13:14:08 PST 2018


Quuxplusone created this revision.
Quuxplusone added a reviewer: rtrieu.
Herald added a subscriber: cfe-commits.

This patch is extracted from https://reviews.llvm.org/D43322, which adds a new diagnostic `-Wreturn-std-move`. This patch here is just the non-functional parts of that patch. It pulls `TryMoveInitialization` out into a separate function so that we can (in the next patch) try it twice — once with current C++ rules, and once with the rules as they would be if `return x` considered rvalue-ref-qualified conversion operators. This patch here does *not* add those new rules; it merely rearranges the existing code to make the next patch less bulky.


Repository:
  rC Clang

https://reviews.llvm.org/D43898

Files:
  include/clang/Sema/Sema.h
  lib/Sema/SemaExprCXX.cpp
  lib/Sema/SemaStmt.cpp
  lib/Sema/SemaTemplateInstantiateDecl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43898.136372.patch
Type: text/x-patch
Size: 11184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180228/9ebae045/attachment.bin>


More information about the cfe-commits mailing list