Fix signal during the call to checkOpenMPLoop.
authorJennifer Yu <jennifer.yu@intel.com>
Tue, 3 Aug 2021 18:16:29 +0000 (11:16 -0700)
committerJennifer Yu <jennifer.yu@intel.com>
Thu, 5 Aug 2021 15:59:35 +0000 (08:59 -0700)
commit6b0f35931a44b0fbd27297f83087d3a4c352e83f
tree29b1bdb28561f552b856b19206253e082dcb57b4
parent72661f337ae03f5cb2988717bc1486cd9bc4baef
Fix signal during the call to checkOpenMPLoop.

The root problem is a null pointer is accessed during the call to
checkOpenMPLoop, because loop up bound expr is an error expression
due to error diagnostic was emit early.

To fix this, in setLCDeclAndLB, setUB and setStep instead return false,
return true when LB, UB or Step contains Error, so that the checking is
stopped in checkOpenMPLoop.

Differential Revision: https://reviews.llvm.org/D107385
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/teams_distribute_loop_messages.cpp