It introduced stack-use-after-return detected by ASAN.
Here:
auto &&CodeGen = [ELoc](CodeGenFunction &CGF) { CGF.CGM.getOpenMPRuntime().emitForStaticFinish(CGF, ELoc); }; CodeGen(CGF); CGF.OMPCancelStack.back().CodeGen = CodeGen;
CodeGen is function on the stack and CGF.OMPCancelStack.back().CodeGen is a
reference which will be used after return from the function with CodeGen.
This reverts commit r286944.