Skip to content

Commit 76c1665

Browse files
[flang] Fix warnings
This patch fixes: flang/lib/Semantics/check-omp-structure.cpp:286:27: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture] flang/lib/Semantics/check-omp-structure.cpp:299:21: error: private field 'sctx_' is not used [-Werror,-Wunused-private-field]
1 parent 30dd129 commit 76c1665

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/lib/Semantics/check-omp-structure.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ struct ContiguousHelper {
283283
return Visit(x.get());
284284
}
285285
template <typename T> std::optional<bool> Visit(const evaluate::Expr<T> &x) {
286-
return common::visit([this](auto &&s) { return Visit(s); }, x.u);
286+
return common::visit([&](auto &&s) { return Visit(s); }, x.u);
287287
}
288288
template <typename T>
289289
std::optional<bool> Visit(const evaluate::Designator<T> &x) {
@@ -296,7 +296,7 @@ struct ContiguousHelper {
296296
}
297297

298298
private:
299-
SemanticsContext &sctx_;
299+
[[maybe_unused]] SemanticsContext &sctx_;
300300
evaluate::FoldingContext &fctx_;
301301
};
302302
} // namespace

0 commit comments

Comments
 (0)