ABataev added inline comments.
================
Comment at: clang/include/clang/AST/OpenMPClause.h:2234
+/// In this example directive '#pragma omp atomic' has 'compare' clause.
+class OMPCompareClause : public OMPClause {
+public:
----------------
`final`
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11398-11400
+ // TODO: For now we emit an error here and in emitOMPAtomicExpr we ignore
+ // code gen.
+ Diag(Body->getBeginLoc(), diag::err_omp_atomic_compare);
----------------
Maybe emit error in codegen instead? Without adding `err_omp_atomic_compare`
message in include/clang/Basic/DiagnosticSemaKinds.td, just emit emit directly
there:
```
unsigned DiagID = CGM.getDiags().getCustomDiagID(
DiagnosticsEngine::Error, "atomic compare is not supported for now");
CGM.getDiags().Report(SLoc, DiagID);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115561/new/
https://reviews.llvm.org/D115561
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits