[all-commits] [llvm/llvm-project] 703038: [Sema] Fix volatile check when testing if a return...
nullptr-cpp via All-commits
all-commits at lists.llvm.org
Tue Nov 10 12:12:45 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 703038b35a864d06e1926237c1568a430417b0b4
https://github.com/llvm/llvm-project/commit/703038b35a864d06e1926237c1568a430417b0b4
Author: Yang Fan <nullptr.cpp at gmail.com>
Date: 2020-11-10 (Tue, 10 Nov 2020)
Changed paths:
M clang/lib/Sema/SemaStmt.cpp
A clang/test/CXX/class/class.init/class.copy.elision/p1.cpp
Log Message:
-----------
[Sema] Fix volatile check when testing if a return object can be implicitly moved
In C++11 standard, to become implicitly movable, the expression in return
statement should be a non-volatile automatic object. CWG1579 changed the rule
to require that the expression only needs to be an automatic object. C++14
standard and C++17 standard kept this rule unchanged. C++20 standard changed
the rule back to require the expression be a non-volatile automatic object.
This should be a typo in standards, and VD should be non-volatile.
Differential Revision: https://reviews.llvm.org/D88295
More information about the All-commits
mailing list