14#ifndef LLVM_CLANG_AST_LAMBDACAPTURE_H
15#define LLVM_CLANG_AST_LAMBDACAPTURE_H
19#include "llvm/ADT/PointerIntPair.h"
29 Capture_Implicit = 0x01,
35 Capture_ByCopy = 0x02,
49 llvm::PointerIntPair<Decl*, 3> DeclAndBits;
83 return DeclAndBits.getPointer() ==
nullptr &&
84 (DeclAndBits.getInt() & Capture_This);
89 return isa_and_nonnull<ValueDecl>(DeclAndBits.getPointer());
95 return DeclAndBits.getPointer() ==
nullptr &&
96 !(DeclAndBits.getInt() & Capture_This);
106 return static_cast<ValueDecl *
>(DeclAndBits.getPointer());
112 return DeclAndBits.getInt() & Capture_Implicit;
134 assert(
isPackExpansion() &&
"No ellipsis location for a non-expansion");
enum clang::sema::@1655::IndirectLocalPathEntry::EntryKind Kind
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Describes the capture of a variable or of this, or of a C++1y init-capture.
bool capturesVariable() const
Determine whether this capture handles a variable.
bool isPackExpansion() const
Determine whether this capture is a pack expansion, which captures a function parameter pack.
bool capturesVLAType() const
Determine whether this captures a variable length array bound expression.
bool isExplicit() const
Determine whether this was an explicit capture (written between the square brackets introducing the l...
SourceLocation getEllipsisLoc() const
Retrieve the location of the ellipsis for a capture that is a pack expansion.
LambdaCaptureKind getCaptureKind() const
Determine the kind of capture.
bool capturesThis() const
Determine whether this capture handles the C++ this pointer.
ValueDecl * getCapturedVar() const
Retrieve the declaration of the local variable being captured.
bool isImplicit() const
Determine whether this was an implicit capture (not written between the square brackets introducing t...
SourceLocation getLocation() const
Retrieve the source location of the capture.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
The JSON file list parser is used to communicate input to InstallAPI.
LambdaCaptureKind
The different capture forms in a lambda introducer.
@ Implicit
An implicit conversion.