[Clang][OpenMP] Add support for compare capture in parser
authorShilei Tian <i@tianshilei.me>
Fri, 18 Feb 2022 15:23:41 +0000 (10:23 -0500)
committerShilei Tian <i@tianshilei.me>
Fri, 18 Feb 2022 15:23:59 +0000 (10:23 -0500)
commitccebf8ac8c61cbd46223abbeb4f29f4e1f7b490c
treebd15b0737954a6c151738fb9f949d92c03e54f99
parent3c84e68ddc4a5c6819fae7cacd41be6b864f7c47
[Clang][OpenMP] Add support for compare capture in parser

This patch adds the support for `atomic compare capture` in parser and part of
sema. We don't create an AST node for this because the spec doesn't say `compare`
and `capture` clauses should be used tightly, so we cannot look one more token
ahead in the parser.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D116261
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/atomic_ast_print.cpp
clang/test/OpenMP/atomic_messages.cpp