forked from OSchip/llvm-project
[flang] Dodge two bogus warnings from g++ 8.1
Original-commit: flang-compiler/f18@aa19aeb92a Reviewed-on: https://github.com/flang-compiler/f18/pull/633
This commit is contained in:
parent
180ba3354b
commit
58ea24d3e3
|
@ -88,9 +88,8 @@ std::optional<DynamicType> ExpressionBase<A>::GetType() const {
|
|||
[&](const auto &x) -> std::optional<DynamicType> {
|
||||
if constexpr (!common::HasMember<decltype(x), TypelessExpression>) {
|
||||
return x.GetType();
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
return std::nullopt; // w/o "else" to dodge bogus g++ 8.1 warning
|
||||
},
|
||||
derived().u);
|
||||
}
|
||||
|
|
|
@ -217,9 +217,8 @@ std::optional<DataRef> ExtractDataRef(const Designator<T> &d) {
|
|||
[](const auto &x) -> std::optional<DataRef> {
|
||||
if constexpr (common::HasMember<decltype(x), decltype(DataRef::u)>) {
|
||||
return DataRef{x};
|
||||
} else {
|
||||
return std::nullopt;
|
||||
}
|
||||
return std::nullopt; // w/o "else" to dodge bogus g++ 8.1 warning
|
||||
},
|
||||
d.u);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue