From a60d201dc9772615f7b81e8166130db2ebe381db Mon Sep 17 00:00:00 2001 From: peter klausler Date: Fri, 16 Feb 2018 10:58:17 -0800 Subject: [PATCH] [flang] Reformatting and some comment clean-up. Original-commit: flang-compiler/f18@cedd3d82cf5aef7ba2bddfa4e13f13efac5600a7 Reviewed-on: https://github.com/flang-compiler/f18/pull/11 --- flang/lib/parser/grammar.h | 2 +- flang/lib/parser/idioms.h | 2 +- flang/lib/parser/parse-state.h | 6 ++---- flang/lib/parser/parse-tree.h | 2 +- flang/lib/parser/token-parsers.h | 3 +-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/flang/lib/parser/grammar.h b/flang/lib/parser/grammar.h index 3317ef37fc35..2d3da999b565 100644 --- a/flang/lib/parser/grammar.h +++ b/flang/lib/parser/grammar.h @@ -8,9 +8,9 @@ // library used here to implement an LL recursive descent recognizer. #include "basic-parsers.h" -#include "token-parsers.h" #include "format-specification.h" #include "parse-tree.h" +#include "token-parsers.h" #include "user-state.h" #include #include diff --git a/flang/lib/parser/idioms.h b/flang/lib/parser/idioms.h index 7283cbdce467..7e64705ffb42 100644 --- a/flang/lib/parser/idioms.h +++ b/flang/lib/parser/idioms.h @@ -22,7 +22,7 @@ #include #include -// Avoid a deduction bug in GNU 7.1.0 headers by forcing the answer. +// Avoid a deduction bug in GNU 7.3.0 headers by forcing the answer. // TODO: better resolution namespace std { template diff --git a/flang/lib/parser/parse-state.h b/flang/lib/parser/parse-state.h index 2965bef1ce92..ccae9a6d3500 100644 --- a/flang/lib/parser/parse-state.h +++ b/flang/lib/parser/parse-state.h @@ -36,8 +36,7 @@ public: strictConformance_{that.strictConformance_}, warnOnNonstandardUsage_{that.warnOnNonstandardUsage_}, warnOnDeprecatedUsage_{that.warnOnDeprecatedUsage_}, - anyErrorRecovery_{that.anyErrorRecovery_} { - } + anyErrorRecovery_{that.anyErrorRecovery_} {} ParseState(ParseState &&that) : cooked_{that.cooked_}, p_{that.p_}, limit_{that.limit_}, column_{that.column_}, messages_{std::move(that.messages_)}, @@ -48,8 +47,7 @@ public: strictConformance_{that.strictConformance_}, warnOnNonstandardUsage_{that.warnOnNonstandardUsage_}, warnOnDeprecatedUsage_{that.warnOnDeprecatedUsage_}, - anyErrorRecovery_{that.anyErrorRecovery_} { - } + anyErrorRecovery_{that.anyErrorRecovery_} {} ParseState &operator=(ParseState &&that) { swap(that); return *this; diff --git a/flang/lib/parser/parse-tree.h b/flang/lib/parser/parse-tree.h index 4dacc35a5ac9..7ee5b1410deb 100644 --- a/flang/lib/parser/parse-tree.h +++ b/flang/lib/parser/parse-tree.h @@ -26,7 +26,7 @@ // Parse tree node class types do not have default constructors. They // explicitly declare "T() {} = delete;" to make this clear. This restriction -// avoids what would otherwise become a viral requirement to include +// prevents the introduction of what would be a viral requirement to include // std::monostate among most std::variant<> discriminated union members. // Parse tree node class types do not have copy constructors or copy assignment diff --git a/flang/lib/parser/token-parsers.h b/flang/lib/parser/token-parsers.h index b6e3e432a7a7..e3e8aef122c7 100644 --- a/flang/lib/parser/token-parsers.h +++ b/flang/lib/parser/token-parsers.h @@ -414,8 +414,7 @@ struct ConsumedAllInputParser { } } consumedAllInput; -template -struct SkipPast { +template struct SkipPast { using resultType = Success; constexpr SkipPast() {} constexpr SkipPast(const SkipPast &) {}