[PATCH] D83336: [flang] Support for image selectors
Tim Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 13:31:05 PDT 2020
tskeith accepted this revision.
tskeith added inline comments.
This revision is now accepted and ready to land.
================
Comment at: flang/lib/Semantics/check-coarray.cpp:113
+ context_.Say(parser::FindSourceLocation(imageSelectorSpec), // C929
+ "TEAM STAT variable can only be specified once"_err_en_US);
+ }
----------------
I think this should be "STAT variable..."
================
Comment at: flang/lib/Semantics/expression.cpp:1090-1100
+ std::visit(
+ common::visitors{
+ [&](const parser::ImageSelectorSpec::Stat &statVar) {
+ Analyze(statVar.v);
+ },
+ [&](const parser::TeamValue &teamValue) { Analyze(teamValue.v); },
+ [&](const parser::ImageSelectorSpec::Team_Number &teamNumber) {
----------------
Because all of the cases are the same, this can be simplified to:
```
std::visit([&](const auto &x) { Analyze(x.v); }, imageSelSpec.u);
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83336/new/
https://reviews.llvm.org/D83336
More information about the llvm-commits
mailing list