forked from OSchip/llvm-project
[flang] Resolve old TODO about needless Indirection<>.
Original-commit: flang-compiler/f18@5f289209c4 Reviewed-on: https://github.com/flang-compiler/f18/pull/73 Tree-same-pre-rewrite: false
This commit is contained in:
parent
0ceb4abf1a
commit
69e3842d60
|
@ -853,9 +853,9 @@ TYPE_CONTEXT_PARSER("array constructor"_en_US,
|
|||
"(/" >> Parser<AcSpec>{} / "/)" || bracketed(Parser<AcSpec>{})))
|
||||
|
||||
// R770 ac-spec -> type-spec :: | [type-spec ::] ac-value-list
|
||||
TYPE_PARSER(construct<AcSpec>(maybe(indirect(typeSpec) / "::"),
|
||||
nonemptyList(Parser<AcValue>{})) ||
|
||||
construct<AcSpec>(indirect(typeSpec) / "::"))
|
||||
TYPE_PARSER(construct<AcSpec>(
|
||||
maybe(typeSpec / "::"), nonemptyList(Parser<AcValue>{})) ||
|
||||
construct<AcSpec>(typeSpec / "::"))
|
||||
|
||||
// R773 ac-value -> expr | ac-implied-do
|
||||
TYPE_PARSER(
|
||||
|
|
|
@ -1155,11 +1155,10 @@ struct AcValue {
|
|||
// R770 ac-spec -> type-spec :: | [type-spec ::] ac-value-list
|
||||
struct AcSpec {
|
||||
BOILERPLATE(AcSpec);
|
||||
AcSpec(std::optional<Indirection<TypeSpec>> &&ts, std::list<AcValue> &&xs)
|
||||
AcSpec(std::optional<TypeSpec> &&ts, std::list<AcValue> &&xs)
|
||||
: type(std::move(ts)), values(std::move(xs)) {}
|
||||
explicit AcSpec(Indirection<TypeSpec> &&ts) : type{std::move(ts)} {}
|
||||
// TODO need Indirection here to compile, don't know why
|
||||
std::optional<Indirection<TypeSpec>> type;
|
||||
explicit AcSpec(TypeSpec &&ts) : type{std::move(ts)} {}
|
||||
std::optional<TypeSpec> type;
|
||||
std::list<AcValue> values;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue