summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-05-20 15:00:53 +0000
committerDouglas Gregor <dgregor@apple.com>2011-05-20 15:00:53 +0000
commit86394411d905e5a0dac0a33e3e859df05365adec (patch)
treeabec248e3c5a4c59031f72ca7b5371e103b913fd
parentcc7a92888538905412bd3ac3f034cab3f95b8603 (diff)
downloadbcm5719-llvm-86394411d905e5a0dac0a33e3e859df05365adec.tar.gz
bcm5719-llvm-86394411d905e5a0dac0a33e3e859df05365adec.zip
Clean up two comments
llvm-svn: 131727
-rw-r--r--clang/include/clang/Sema/Initialization.h3
-rw-r--r--clang/lib/Sema/SemaStmt.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/clang/include/clang/Sema/Initialization.h b/clang/include/clang/Sema/Initialization.h
index e83e5c0ccfd..b64a63fb692 100644
--- a/clang/include/clang/Sema/Initialization.h
+++ b/clang/include/clang/Sema/Initialization.h
@@ -101,7 +101,8 @@ private:
/// the temporary is being created.
unsigned Location;
- /// \brief Whether the
+ /// \brief Whether the entity being initialized may end up using the
+ /// named return value optimization (NRVO).
bool NRVO;
} LocAndNRVO;
diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp
index 60fcb10d536..536e86573b4 100644
--- a/clang/lib/Sema/SemaStmt.cpp
+++ b/clang/lib/Sema/SemaStmt.cpp
@@ -1456,7 +1456,10 @@ Sema::ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope) {
/// \param E The expression being returned from the function or block, or
/// being thrown.
///
-/// \param AllowFunctionParameter
+/// \param AllowFunctionParameter Whether we allow function parameters to
+/// be considered NRVO candidates. C++ prohibits this for NRVO itself, but
+/// we re-use this logic to determine whether we should try to move as part of
+/// a return or throw (which does allow function parameters).
///
/// \returns The NRVO candidate variable, if the return statement may use the
/// NRVO, or NULL if there is no such candidate.
OpenPOWER on IntegriCloud