diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-01-21 18:05:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-01-21 18:05:27 +0000 |
commit | f5d8f466c3eebaffc51468812bdcbe7f0fe4891a (patch) | |
tree | 52fd20cb43a74996551e5b3e164c1bf87ff7f881 /lib/Sema/SemaInit.cpp | |
parent | b939a1987318f802fd25f89e15ae7d2423161cac (diff) |
Promote the static getNRVOCandidate() function, which computed the
NRVO candidate for a return statement, to
Sema::getCopyElisionCandidate(), and teach it enough to also determine
the NRVO candidate for a throw expression. We still don't use the
latter information, however.
Along the way, implement core issue 1148, which eliminates copy
elision from catch parameters and clarifies that copy elision cannot
occur from function parameters (which we already implemented).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 3ed336dbb8..9e8a15739f 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3317,7 +3317,7 @@ static ExprResult CopyObject(Sema &S, if (!Class) return move(CurInit); - // C++0x [class.copy]p34: + // C++0x [class.copy]p32: // When certain criteria are met, an implementation is allowed to // omit the copy/move construction of a class object, even if the // copy/move constructor and/or destructor for the object have |