mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
clang-tidy without config changes (#1147)
Separating out existing fixes because of #1148 which turns on more.
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user