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

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 12:44:26 PST 2022


ABataev added inline comments.


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11801-11807
+  } else if (AtomicKind == OMPC_compare_capture) {
+    // TODO: For now we emit an error here and in emitOMPAtomicExpr we ignore
+    // code gen.
+    unsigned DiagID = Diags.getCustomDiagID(
+        DiagnosticsEngine::Error,
+        "atomic compare capture is not supported for now");
+    Diag(AtomicKindLoc, DiagID);
----------------
Better to build a node and emit error in codegen. Without it you're unable to create ast-print/dump tests, test for serialization/deserialization etc.


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