[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 8 22:02:24 PST 2022


tianshilei1992 marked 2 inline comments as done.
tianshilei1992 added inline comments.


================
Comment at: clang/lib/AST/OpenMPClause.cpp:1804
+void OMPClausePrinter::VisitOMPCompareCaptureClause(OMPCompareCaptureClause *) {
+  // Do nothing as it is dummy.
+}
----------------
ABataev wrote:
> Output?
I did it on purpose because `OMPCompareCaptureClause` is a dummy node. When it is visited (I really doubt if it can be visited because we don't create it explicitly), it should not output any thing. `compare` and `capture` are printed when visiting the two clauses.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11363-11364
       break;
+    case OMPC_compare_capture:
+      llvm_unreachable("OMPC_compare_capture should never be created");
     default:
----------------
ABataev wrote:
> Why?
For the same reason for the output in AST.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116261



More information about the llvm-commits mailing list