diff options
author | Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com> | 2024-06-29 09:37:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-29 09:37:32 -0500 |
commit | 0ce801f91cd79bd2f94469bdf4c48e82f2721ec1 (patch) | |
tree | 7b400e2d948c47be09ad9b842f791d8cb79a7412 /clang/lib/Parse/ParseOpenMP.cpp | |
parent | 101a936bde47744084e04a64aa9af85c75d03afd (diff) | |
download | llvm-0ce801f91cd79bd2f94469bdf4c48e82f2721ec1.zip llvm-0ce801f91cd79bd2f94469bdf4c48e82f2721ec1.tar.gz llvm-0ce801f91cd79bd2f94469bdf4c48e82f2721ec1.tar.bz2 |
[clang][OpenMP] Implement `isOpenMPExecutableDirective` (#97089)
What is considered "executable" in clang differs slightly from the
OpenMP's "executable" category. In addition to the executable category,
subsidiary directives, and OMPD_error are considered executable.
Implement a function that performs that check.
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 00f9ebb..326cd22ff 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -2397,10 +2397,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( StmtResult Parser::ParseOpenMPExecutableDirective( ParsedStmtContext StmtCtx, OpenMPDirectiveKind DKind, SourceLocation Loc, bool ReadDirectiveWithinMetadirective) { - assert((DKind == OMPD_error || - getDirectiveCategory(DKind) == Category::Executable || - getDirectiveCategory(DKind) == Category::Subsidiary) && - "Directive with an unexpected category"); + assert(isOpenMPExecutableDirective(DKind) && "Unexpected directive category"); + bool HasAssociatedStatement = true; Association Assoc = getDirectiveAssociation(DKind); |