[flang] reformat

Original-commit: flang-compiler/f18@4a4648facd
Reviewed-on: https://github.com/flang-compiler/f18/pull/59
Tree-same-pre-rewrite: false
This commit is contained in:
peter klausler 2018-04-17 14:45:43 -07:00
parent 984db1b650
commit bdc1577188
4 changed files with 10 additions and 9 deletions

View File

@ -3414,8 +3414,8 @@ TYPE_PARSER(construct<ProcedureDesignator>{}(Parser<ProcComponentRef>{}) ||
construct<ProcedureDesignator>{}(name))
// R1523 actual-arg-spec -> [keyword =] actual-arg
TYPE_PARSER(
construct<ActualArgSpec>{}(maybe(keyword / "=" / !"="_ch), Parser<ActualArg>{}))
TYPE_PARSER(construct<ActualArgSpec>{}(
maybe(keyword / "=" / !"="_ch), Parser<ActualArg>{}))
// R1524 actual-arg ->
// expr | variable | procedure-name | proc-component-ref |

View File

@ -81,7 +81,6 @@ private:
std::size_t bytes_{1};
};
class Message : public ReferenceCounted<Message> {
public:
using Context = CountedReference<Message>;
@ -94,14 +93,15 @@ public:
Message(Provenance p, MessageFixedText t, Message *c = nullptr)
: provenance_{p}, text_{t}, context_{c}, isFatal_{t.isFatal()} {}
Message(Provenance p, MessageFormattedText &&s, Message *c = nullptr)
: provenance_{p}, string_{s.MoveString()}, context_{c},
isFatal_{s.isFatal()} {}
: provenance_{p}, string_{s.MoveString()}, context_{c}, isFatal_{
s.isFatal()} {}
Message(Provenance p, MessageExpectedText t, Message *c = nullptr)
: provenance_{p}, text_{t.AsMessageFixedText()},
isExpectedText_{true}, context_{c}, isFatal_{true} {}
Message(const char *csl, MessageFixedText t, Message *c = nullptr)
: cookedSourceLocation_{csl}, text_{t}, context_{c}, isFatal_{t.isFatal()} {}
: cookedSourceLocation_{csl}, text_{t}, context_{c}, isFatal_{t.isFatal()} {
}
Message(const char *csl, MessageFormattedText &&s, Message *c = nullptr)
: cookedSourceLocation_{csl}, string_{s.MoveString()}, context_{c},
isFatal_{s.isFatal()} {}

View File

@ -46,8 +46,8 @@ public:
warnOnDeprecatedUsage_{that.warnOnDeprecatedUsage_},
anyErrorRecovery_{that.anyErrorRecovery_},
anyConformanceViolation_{that.anyConformanceViolation_},
deferMessages_{that.deferMessages_},
anyDeferredMessages_{that.anyDeferredMessages_} {}
deferMessages_{that.deferMessages_}, anyDeferredMessages_{
that.anyDeferredMessages_} {}
ParseState &operator=(const ParseState &that) {
p_ = that.p_, limit_ = that.limit_;
userState_ = that.userState_, inFixedForm_ = that.inFixedForm_;

View File

@ -14,9 +14,10 @@ public:
void TakeReference() { ++references_; }
void DropReference() {
if (--references_ == 0) {
delete static_cast<A*>(this);
delete static_cast<A *>(this);
}
}
private:
int references_{0};
};