diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-11 02:51:16 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-11 02:51:16 +0000 |
commit | 668165ab1e604b063c0aa0df8ff91c80879670bf (patch) | |
tree | 5528d576fe6e69f4af6bacaa1d1bf408e406b8f0 /include/clang/Sema/ScopeInfo.h | |
parent | b70a3bad9c767b3cdeadf363d4dbe8ad25a26588 (diff) |
Make sure Sema creates a field for 'this' captures. (Doug, please double-check that this is correct.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/ScopeInfo.h')
-rw-r--r-- | include/clang/Sema/ScopeInfo.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Sema/ScopeInfo.h b/include/clang/Sema/ScopeInfo.h index 91f468b3e5..ea77ff49cb 100644 --- a/include/clang/Sema/ScopeInfo.h +++ b/include/clang/Sema/ScopeInfo.h @@ -156,8 +156,8 @@ public: CopyExprAndNested(Cpy, isNested) {} enum IsThisCapture { ThisCapture }; - Capture(IsThisCapture, bool isNested, SourceLocation Loc) - : VarAndKind(0, Cap_This), CopyExprAndNested(0, isNested), Loc(Loc) { + Capture(IsThisCapture, bool isNested, SourceLocation Loc, Expr *Cpy) + : VarAndKind(0, Cap_This), CopyExprAndNested(Cpy, isNested), Loc(Loc) { } bool isThisCapture() const { return VarAndKind.getInt() == Cap_This; } @@ -208,8 +208,8 @@ public: CaptureMap[Var] = Captures.size(); } - void AddThisCapture(bool isNested, SourceLocation Loc) { - Captures.push_back(Capture(Capture::ThisCapture, isNested, Loc)); + void AddThisCapture(bool isNested, SourceLocation Loc, Expr *Cpy) { + Captures.push_back(Capture(Capture::ThisCapture, isNested, Loc, Cpy)); CXXThisCaptureIndex = Captures.size(); } |