Deleted Added
full compact
LambdaCapture.h (276479) LambdaCapture.h (280031)
1//===--- LambdaCapture.h - Types for C++ Lambda Captures --------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 54 unchanged lines hidden (view full) ---

63 VarDecl *Var = nullptr,
64 SourceLocation EllipsisLoc = SourceLocation());
65
66 /// \brief Determine the kind of capture.
67 LambdaCaptureKind getCaptureKind() const;
68
69 /// \brief Determine whether this capture handles the C++ \c this
70 /// pointer.
1//===--- LambdaCapture.h - Types for C++ Lambda Captures --------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 54 unchanged lines hidden (view full) ---

63 VarDecl *Var = nullptr,
64 SourceLocation EllipsisLoc = SourceLocation());
65
66 /// \brief Determine the kind of capture.
67 LambdaCaptureKind getCaptureKind() const;
68
69 /// \brief Determine whether this capture handles the C++ \c this
70 /// pointer.
71 bool capturesThis() const { return DeclAndBits.getPointer() == nullptr; }
71 bool capturesThis() const {
72 return (DeclAndBits.getPointer() == nullptr) &&
73 !(DeclAndBits.getInt() & Capture_ByCopy);
74 }
72
73 /// \brief Determine whether this capture handles a variable.
74 bool capturesVariable() const {
75 return dyn_cast_or_null<VarDecl>(DeclAndBits.getPointer());
76 }
77
75
76 /// \brief Determine whether this capture handles a variable.
77 bool capturesVariable() const {
78 return dyn_cast_or_null<VarDecl>(DeclAndBits.getPointer());
79 }
80
81 /// \brief Determine whether this captures a variable length array bound
82 /// expression.
83 bool capturesVLAType() const {
84 return (DeclAndBits.getPointer() == nullptr) &&
85 (DeclAndBits.getInt() & Capture_ByCopy);
86 }
87
78 /// \brief Determine whether this is an init-capture.
79 bool isInitCapture() const {
80 return capturesVariable() && getCapturedVar()->isInitCapture();
81 }
82
83 /// \brief Retrieve the declaration of the local variable being
84 /// captured.
85 ///

--- 38 unchanged lines hidden ---
88 /// \brief Determine whether this is an init-capture.
89 bool isInitCapture() const {
90 return capturesVariable() && getCapturedVar()->isInitCapture();
91 }
92
93 /// \brief Retrieve the declaration of the local variable being
94 /// captured.
95 ///

--- 38 unchanged lines hidden ---