[Concepts] Fix incorrect DeclContext for transformed RequiresExprBodyDecl
authorSaar Raz <saar@raz.email>
Tue, 10 Mar 2020 21:17:00 +0000 (23:17 +0200)
committerSaar Raz <saar@raz.email>
Tue, 10 Mar 2020 21:17:00 +0000 (23:17 +0200)
commit9769e1ee9acc33638449b50ac394b5ee2d4efb60
tree2d4467c860f4eff55b037d1a241a2349181622dc
parent40568fec7e3eb51554cbdaf63a8044830be93fa4
[Concepts] Fix incorrect DeclContext for transformed RequiresExprBodyDecl

We would assign the incorrect DeclContext when transforming the RequiresExprBodyDecl, causing incorrect
handling of 'this' inside RequiresExprBodyDecls (bug #45162).

Assign the current context as the DeclContext of the transformed decl.
clang/lib/Sema/TreeTransform.h
clang/test/SemaTemplate/instantiate-requires-expr.cpp