[clang] [llvm] [OpenMP] Missing implicit otherwise clause in metadirective. (PR #127113)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 17 10:16:47 PST 2025
================
@@ -2882,6 +2882,12 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective(
/*ReadDirectiveWithinMetadirective=*/true);
break;
}
+ // If no match is found and no otherwise clause is present, skip
+ // OMP5.2 Chapter 7.4: If no otherwise clause is specified the effect is as
+ // if one was specified without an associated directive variant.
+ if (BestIdx == -1 && Idx == 1) {
+ SkipUntil(tok::annot_pragma_openmp_end,tok::identifier);
----------------
alexey-bataev wrote:
You still losing some data, SkipUntil does not work here
https://github.com/llvm/llvm-project/pull/127113
More information about the llvm-commits
mailing list