diff options
Diffstat (limited to 'include/clang/AST/ExprCXX.h')
-rw-r--r-- | include/clang/AST/ExprCXX.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/clang/AST/ExprCXX.h b/include/clang/AST/ExprCXX.h index a241d1eded..925b16697c 100644 --- a/include/clang/AST/ExprCXX.h +++ b/include/clang/AST/ExprCXX.h @@ -1401,6 +1401,10 @@ public: } /// \brief Retrieve the field for an init-capture. + /// + /// This works only for an init-capture. To retrieve the FieldDecl for + /// a captured variable or for a capture of \c this, use + /// LambdaExpr::getLambdaClass and CXXRecordDecl::getCaptureFields. FieldDecl *getInitCaptureField() const { assert(getCaptureKind() == LCK_Init && "no field for non-init-capture"); return cast<FieldDecl>(DeclAndBits.getPointer()); @@ -1410,8 +1414,8 @@ public: /// written between the square brackets introducing the lambda). bool isImplicit() const { return DeclAndBits.getInt() & Capture_Implicit; } - /// \brief Determine whether this was an explicit capture, written - /// between the square brackets introducing the lambda. + /// \brief Determine whether this was an explicit capture (written + /// between the square brackets introducing the lambda). bool isExplicit() const { return !isImplicit(); } /// \brief Retrieve the source location of the capture. |