clang-tidy without config changes (#1147)

Separating out existing fixes because of #1148 which turns on more.
This commit is contained in:
Jon Meow
2022-03-22 11:13:27 -07:00
committed by GitHub
parent 694a0a7dfb
commit e5a87af6fe
7 changed files with 25 additions and 27 deletions
+3 -3
View File
@@ -132,7 +132,7 @@ class FunctionDeclaration : public Declaration {
constant_value_ = value;
}
bool is_method() const { return me_pattern_.has_value(); }
auto is_method() const -> bool { return me_pattern_.has_value(); }
private:
void ResolveDeducedAndReceiver(const std::vector<Nonnull<AstNode*>>&);
@@ -268,7 +268,7 @@ class VariableDeclaration : public Declaration {
auto initializer() -> Expression& { return **initializer_; }
auto value_category() const -> ValueCategory { return value_category_; }
bool has_initializer() const { return initializer_.has_value(); }
auto has_initializer() const -> bool { return initializer_.has_value(); }
private:
// TODO: split this into a non-optional name and a type, initialized by
@@ -335,7 +335,7 @@ class ImplDeclaration : public Declaration {
kind_(kind),
impl_type_(impl_type),
interface_(interface),
members_(members) {}
members_(std::move(members)) {}
static auto classof(const AstNode* node) -> bool {
return InheritsFromImplDeclaration(node->kind());