diff options
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 33bf74b5d39..7dca3805973 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -263,9 +263,9 @@ public: if (I->capturesThis()) CXXThisFieldDecl = *Field; else if (I->capturesVariable()) - CaptureFields[I->getCapturedVar()] = *Field; + CaptureFields[I->getCapturedVar()->getCanonicalDecl()] = *Field; else if (I->capturesVariableByCopy()) - CaptureFields[I->getCapturedVar()] = *Field; + CaptureFields[I->getCapturedVar()->getCanonicalDecl()] = *Field; } } @@ -279,7 +279,7 @@ public: /// \brief Lookup the captured field decl for a variable. virtual const FieldDecl *lookup(const VarDecl *VD) const { - return CaptureFields.lookup(VD); + return CaptureFields.lookup(VD->getCanonicalDecl()); } bool isCXXThisExprCaptured() const { return getThisFieldDecl() != nullptr; } |