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 | 5d36900d7a6840624efcf7522c3d02bdbd3acf17 (patch) | |
| tree | 815b4b660765552fbeb8f7da37f720a54d13c6ac /clang/lib/Sema/SemaInit.cpp | |
| parent | 6381402fe11293204debaa5a4dac5e7f285225d2 (diff) | |
| download | bcm5719-llvm-5d36900d7a6840624efcf7522c3d02bdbd3acf17.tar.gz bcm5719-llvm-5d36900d7a6840624efcf7522c3d02bdbd3acf17.zip | |
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).
llvm-svn: 123982
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index 3ed336dbb83..9e8a15739f1 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/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 |

