aboutsummaryrefslogtreecommitdiff
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
commit4926d832aa2f0af9d7c00633727d49e7967eb978 (patch)
treeaee44fda1714c7a2cb375238e6e988682c594871
parenta0448264c7da395ca9416c6570bc43a7f49e436b (diff)
Clean up two comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131727 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Sema/Initialization.h3
-rw-r--r--lib/Sema/SemaStmt.cpp5
2 files changed, 6 insertions, 2 deletions
diff --git a/include/clang/Sema/Initialization.h b/include/clang/Sema/Initialization.h
index e83e5c0ccf..b64a63fb69 100644
--- a/include/clang/Sema/Initialization.h
+++ b/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/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 60fcb10d53..536e86573b 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/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.