[flang] Misc changes for review

Original-commit: flang-compiler/f18@6d9ddb8f5e
Reviewed-on: https://github.com/flang-compiler/f18/pull/681
This commit is contained in:
David Truby 2019-08-23 21:17:57 +01:00
parent 0adca8bedc
commit 1281b9c5fc
2 changed files with 3 additions and 3 deletions

View File

@ -2932,7 +2932,7 @@ struct GenericStmt {
struct InterfaceStmt { struct InterfaceStmt {
UNION_CLASS_BOILERPLATE(InterfaceStmt); UNION_CLASS_BOILERPLATE(InterfaceStmt);
// Workaround for clang with libstc++10 bug // Workaround for clang with libstc++10 bug
InterfaceStmt(Abstract x) : u(x) {} InterfaceStmt(Abstract x) : u{x} {}
std::variant<std::optional<GenericSpec>, Abstract> u; std::variant<std::optional<GenericSpec>, Abstract> u;
}; };

View File

@ -2998,8 +2998,8 @@ void DeclarationVisitor::Post(const parser::CharSelector::LengthAndKind &x) {
} }
void DeclarationVisitor::Post(const parser::CharLength &x) { void DeclarationVisitor::Post(const parser::CharLength &x) {
if (const auto *length{std::get_if<std::uint64_t>(&x.u)}) { if (const auto *length{std::get_if<std::uint64_t>(&x.u)}) {
charInfo_.length = ParamValue{static_cast<ConstantSubscript>(*length), charInfo_.length = ParamValue{
common::TypeParamAttr::Len}; static_cast<ConstantSubscript>(*length), common::TypeParamAttr::Len};
} else { } else {
charInfo_.length = GetParamValue( charInfo_.length = GetParamValue(
std::get<parser::TypeParamValue>(x.u), common::TypeParamAttr::Len); std::get<parser::TypeParamValue>(x.u), common::TypeParamAttr::Len);