[clang] [OpenACC] Implement 'cache' construct parsing (PR #74324)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 5 07:26:00 PST 2023
================
@@ -298,7 +367,18 @@ void Parser::ParseOpenACCDirective() {
T.consumeClose();
break;
}
+ case OpenACCDirectiveKind::Cache:
+ ParseOpenACCCacheVarList();
+ // The ParseOpenACCCacheVarList function manages to recover from failures,
+ // so we can always consume the close.
+ T.consumeClose();
+ break;
}
+ } else if (DirKind == OpenACCDirectiveKind::Cache) {
+ // Cache's paren var-list is required, so error here if it isn't provided.
+ // We know that the consumeOpen above left the first non-paren here, so use
+ // expectAndConsume to emit the proper dialog, then continue.
+ (void)T.expectAndConsume();
----------------
erichkeane wrote:
Yeah, ok, I was afraid I was 10% too clever there :)
https://github.com/llvm/llvm-project/pull/74324
More information about the cfe-commits
mailing list