[PATCH] D83336: [flang] Support for image selectors
Pete Steinfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 15:12:13 PDT 2020
PeteSteinfeld marked 2 inline comments as done.
PeteSteinfeld added inline comments.
================
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);
+ }
----------------
tskeith wrote:
> I think this should be "STAT variable..."
So it shall be written.
================
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) {
----------------
tskeith wrote:
> Because all of the cases are the same, this can be simplified to:
> ```
> std::visit([&](const auto &x) { Analyze(x.v); }, imageSelSpec.u);
> ```
Thanks! I thought there might be something like this.
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