[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)
Urvi Rav via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 27 06:14:53 PDT 2025
================
@@ -2759,6 +2759,18 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective(
OpenMPClauseKind CKind = Tok.isAnnotation()
? OMPC_unknown
: getOpenMPClauseKind(PP.getSpelling(Tok));
+ // Check if the clause is unrecognized.
+ if (CKind == OMPC_unknown) {
+ Diag(Tok, diag::err_omp_unknown_clause)
+ << PP.getSpelling(Tok) << "metadirective";
----------------
ravurvi20 wrote:
@alexey-bataev I have addressed it and modified the error messages. Could please take a look at it again.
https://github.com/llvm/llvm-project/pull/128640
More information about the cfe-commits
mailing list