[PATCH] D116261: [Clang][OpenMP] Add support for compare capture in parser
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 8 09:38:30 PST 2022
ABataev added inline comments.
================
Comment at: clang/include/clang/AST/OpenMPClause.h:2277
+/// clauses.
+class OMPCompareCaptureClause : public OMPClause {
+public:
----------------
`final`
================
Comment at: clang/lib/AST/OpenMPClause.cpp:1804
+void OMPClausePrinter::VisitOMPCompareCaptureClause(OMPCompareCaptureClause *) {
+ // Do nothing as it is dummy.
+}
----------------
Output?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11328
+ MutexClauseEncountered = true;
+ [[clang::fallthrough]];
case OMPC_capture:
----------------
Use `LLVM_FALLTHROUGH`
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11363-11364
break;
+ case OMPC_compare_capture:
+ llvm_unreachable("OMPC_compare_capture should never be created");
default:
----------------
Why?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11807-11812
+ // 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);
----------------
Emit in codegen
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116261/new/
https://reviews.llvm.org/D116261
More information about the cfe-commits
mailing list