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

Shilei Tian via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 11 07:29:15 PST 2022

tianshilei1992 marked an inline comment as done.
tianshilei1992 added inline comments.

Comment at: clang/lib/Sema/SemaOpenMP.cpp:11790-11797
+    if (IsCompareCapture) {
+      // 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);
ABataev wrote:
> Better not to emit error here, if possible. What's prevent this?
I put it here because I think we don't have Sema support yet, so it is not good to move it to later phase like codegen because that will implicitly mean Sema has already passed but apparently it doesn't. Of course like atomic compare, I'll move it to codegen in the Sema patch.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list