Skip to content
Commit 703038b3 authored by Yang Fan's avatar Yang Fan Committed by Arthur O'Dwyer
Browse files

[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
parent 6cb1c0ca
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment