[clang] [OpenACC][NFC] Implement basic OpenACC Sema infrastructure (PR #81874)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 15 09:07:25 PST 2024
================
@@ -1197,7 +1215,20 @@ StmtResult Parser::ParseOpenACCDirectiveStmt() {
ParsingOpenACCDirectiveRAII DirScope(*this);
ConsumeAnnotationToken();
- ParseOpenACCDirective();
+ OpenACCDirectiveParseInfo DirInfo = ParseOpenACCDirective();
+ if (getActions().ActOnStartOpenACCDeclDirective(DirInfo.DirKind,
+ DirInfo.StartLoc))
+ return StmtError();
+
+ StmtResult AssocStmt;
+
+ if (doesDirectiveHaveAssociatedStmt(DirInfo.DirKind)) {
----------------
erichkeane wrote:
This section ends up being slightly worse without being able to check the AST kind here, so we need a separate function to check whether we need to parse one. However, this removes the ASTContext function that was troublesome.
https://github.com/llvm/llvm-project/pull/81874
More information about the cfe-commits
mailing list