[clang] [OpenACC] Implement Sema work for OpenACC Clauses (PR #87821)
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 8 08:57:42 PDT 2024
================
@@ -1204,15 +1238,16 @@ Parser::OpenACCDirectiveParseInfo Parser::ParseOpenACCDirective() {
Diag(Tok, diag::err_expected) << tok::l_paren;
}
- // Parses the list of clauses, if present.
- ParseOpenACCClauseList(DirKind);
+ // Parses the list of clauses, if present, plus set up return value.
+ OpenACCDirectiveParseInfo ParseInfo{DirKind, StartLoc, SourceLocation{},
+ ParseOpenACCClauseList(DirKind)};
assert(Tok.is(tok::annot_pragma_openacc_end) &&
"Didn't parse all OpenACC Clauses");
- SourceLocation EndLoc = ConsumeAnnotationToken();
- assert(EndLoc.isValid());
+ ParseInfo.EndLoc = ConsumeAnnotationToken();
+ assert(ParseInfo.EndLoc.isValid());
----------------
alexey-bataev wrote:
Add assertion message
https://github.com/llvm/llvm-project/pull/87821
More information about the cfe-commits
mailing list