[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

Sunil K via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 20 03:28:34 PDT 2023


koops updated this revision to Diff 557808.
koops added a comment.

1. In class OMPFailClause, the was a duplication in the storage of parameter to the fail clause because the parameter was stored as FailParameterKind and MemoryOrderClause (FailMemoryOrderClause). There was a possibility of these two being out of sync along with confusion to the reader of the code. Hence storing FailMemoryOrderClause only. The FailParameterKind (of type ClauseKind) is now obtained from the FailMemoryOrderClause when needed.
2. In Visit(const OMPClause *C) there is a check for if (const auto *OMPC = dyn_cast<OMPFailClause>(C)). This is mainly done to visit the parameter of the FailClause which is a memory Order Clause.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123235/new/

https://reviews.llvm.org/D123235

Files:
  clang/include/clang/AST/ASTNodeTraverser.h
  clang/include/clang/AST/OpenMPClause.h
  clang/include/clang/AST/RecursiveASTVisitor.h
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Basic/OpenMPKinds.def
  clang/include/clang/Parse/Parser.h
  clang/include/clang/Sema/Sema.h
  clang/lib/AST/OpenMPClause.cpp
  clang/lib/AST/StmtProfile.cpp
  clang/lib/Basic/OpenMPKinds.cpp
  clang/lib/CodeGen/CGStmtOpenMP.cpp
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/lib/Sema/TreeTransform.h
  clang/lib/Serialization/ASTReader.cpp
  clang/lib/Serialization/ASTWriter.cpp
  clang/test/OpenMP/atomic_ast_print.cpp
  clang/test/OpenMP/atomic_messages.cpp
  clang/tools/libclang/CIndex.cpp
  flang/lib/Semantics/check-omp-structure.cpp
  llvm/include/llvm/Frontend/OpenMP/OMP.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123235.557808.patch
Type: text/x-patch
Size: 29332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20231020/805f6dad/attachment-0001.bin>


More information about the cfe-commits mailing list