[flang-commits] [PATCH] D127796: [flang] ERROR STOP is not an image control statement
Peter Klausler via Phabricator via flang-commits
flang-commits at lists.llvm.org
Wed Jun 15 14:39:57 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGeb6cd7fe316c: [flang] ERROR STOP is not an image control statement (authored by klausler).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127796/new/
https://reviews.llvm.org/D127796
Files:
flang/lib/Semantics/tools.cpp
Index: flang/lib/Semantics/tools.cpp
===================================================================
--- flang/lib/Semantics/tools.cpp
+++ flang/lib/Semantics/tools.cpp
@@ -875,11 +875,11 @@
}
class ImageControlStmtHelper {
- using ImageControlStmts = std::variant<parser::ChangeTeamConstruct,
- parser::CriticalConstruct, parser::EventPostStmt, parser::EventWaitStmt,
- parser::FormTeamStmt, parser::LockStmt, parser::StopStmt,
- parser::SyncAllStmt, parser::SyncImagesStmt, parser::SyncMemoryStmt,
- parser::SyncTeamStmt, parser::UnlockStmt>;
+ using ImageControlStmts =
+ std::variant<parser::ChangeTeamConstruct, parser::CriticalConstruct,
+ parser::EventPostStmt, parser::EventWaitStmt, parser::FormTeamStmt,
+ parser::LockStmt, parser::SyncAllStmt, parser::SyncImagesStmt,
+ parser::SyncMemoryStmt, parser::SyncTeamStmt, parser::UnlockStmt>;
public:
template <typename T> bool operator()(const T &) {
@@ -929,6 +929,11 @@
}
return false;
}
+ bool operator()(const parser::StopStmt &stmt) {
+ // STOP is an image control statement; ERROR STOP is not
+ return std::get<parser::StopStmt::Kind>(stmt.t) ==
+ parser::StopStmt::Kind::Stop;
+ }
bool operator()(const parser::Statement<parser::ActionStmt> &stmt) {
return common::visit(*this, stmt.statement.u);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127796.437346.patch
Type: text/x-patch
Size: 1369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220615/c6c42737/attachment.bin>
More information about the flang-commits
mailing list