-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Open
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
We claim to support guaranteed copy elision in C++03, but we still perform access checks for copy constructors (before c++17)
https://godbolt.org/z/WPEh8e94c
class S {
public:
S(int, int);
// private:
S(const S &);
};
S s = S(0, 0);
If we make the constructor public, RVO is performed https://godbolt.org/z/WPEh8e94c
Aditionally __cpp_guaranteed_copy_elision
is not set even if the documentation claim it should be
https://clang.llvm.org/docs/LanguageExtensions.html#id34
Maybe the documentation is just wrong.
PJBoy
Metadata
Metadata
Assignees
Labels
clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"