[Clang][Sema] Check unexpected else statement in cond-update-stmt
authorShilei Tian <i@tianshilei.me>
Mon, 21 Feb 2022 13:20:26 +0000 (08:20 -0500)
committerShilei Tian <i@tianshilei.me>
Mon, 21 Feb 2022 13:20:34 +0000 (08:20 -0500)
commit6da60647cda2fad4d93e359ef3afaea18599b2ba
tree35357fcdbb3527b7afc0a91a2a96ad714863c8d6
parent40d06c4ce94d4f3ba36596cee511d436b3d22ffd
[Clang][Sema] Check unexpected else statement in cond-update-stmt

In 'cond-update-stmt', `else` statement is not expected. This patch adds
the check in Sema.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D120225
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/atomic_messages.c