[PATCH] D88295: [Sema] Fix volatile check when test if a return object can be implicitly move

Aaron Puchert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 30 13:11:22 PDT 2020


aaronpuchert added a comment.

In D88295#2365474 <https://reviews.llvm.org/D88295#2365474>, @rsmith wrote:

> The other is whether implicitly move in a `co_return` statement. In that case, I think the use of `CES_AsIfByStdMove` is a mistake, and we should be using `CES_Default` there.

I did some work on `co_return` in D68845 <https://reviews.llvm.org/D68845> that I should probably warm up again. I think the issue still exists.

We agreed there that we should use `CES_Default`. Unfortunately it was a little bit more difficult though, and we were not sure whether the standard wants to say the things it says at some point.



================
Comment at: clang/test/CXX/special/class.copy/copy-elision.cpp:1-4
+// RUN: %clang_cc1 -std=c++20 -emit-llvm -triple x86_64-unknown-linux-gnu -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -emit-llvm -triple x86_64-unknown-linux-gnu -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -emit-llvm -triple x86_64-unknown-linux-gnu -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -triple x86_64-unknown-linux-gnu -o - %s | FileCheck %s
----------------
Since the issue doesn't depend on the standard version I guess that one execution (without `-std=` flag) is enough, but maybe others have a different opinion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88295/new/

https://reviews.llvm.org/D88295



More information about the cfe-commits mailing list