================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits