forked from OSchip/llvm-project
2aa4335806
Before this patch, the Restorer depended on copy elision to happen. Without copy elision, the function ScopedSet calls the move constructor before its dtor. The dtor will prematurely restore the reference to the original value. Instead of relying the compiler to not use the Restorer's copy constructor, delete its copy and assign operators. Hence, callers cannot move or copy a Restorer object anymore, and have to explicitly provide the reset state. ScopedSet avoids calling move/copy operations by relying on unnamed return value optimization, which is mandatory in C++17. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D88797 |
||
---|---|---|
.. | ||
Common | ||
Config | ||
Decimal | ||
Evaluate | ||
Frontend | ||
FrontendTool | ||
Lower | ||
Optimizer | ||
Parser | ||
Semantics | ||
CMakeLists.txt | ||
ISO_Fortran_binding.h | ||
Version.inc.in |