mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 15:41:04 +01:00
Finish making clang-tidy (mostly) work (again) and run -fix (#2312)
This does some more work to the run_clang_tidy.py wrapper script, and runs an example pass. "again" because it's really the proto fuzzer changes that broke it, it had been working before. "mostly" because there's still an issue within the proto fuzzer that it can't find "port/protobuf.h", i.e. https://github.com/google/libprotobuf-mutator/tree/master/port, but I'm still hesitant to add an include path there.
This commit is contained in:
@@ -15,7 +15,7 @@ Member::Member(Nonnull<const NamedValue*> struct_member)
|
||||
: member_(struct_member) {}
|
||||
|
||||
auto Member::name() const -> std::string_view {
|
||||
if (const Declaration* decl = member_.dyn_cast<const Declaration*>()) {
|
||||
if (const auto* decl = member_.dyn_cast<const Declaration*>()) {
|
||||
return GetName(*decl).value();
|
||||
} else {
|
||||
return member_.get<const NamedValue*>()->name;
|
||||
@@ -23,7 +23,7 @@ auto Member::name() const -> std::string_view {
|
||||
}
|
||||
|
||||
auto Member::type() const -> const Value& {
|
||||
if (const Declaration* decl = member_.dyn_cast<const Declaration*>()) {
|
||||
if (const auto* decl = member_.dyn_cast<const Declaration*>()) {
|
||||
return decl->static_type();
|
||||
} else {
|
||||
return *member_.get<const NamedValue*>()->value;
|
||||
@@ -31,7 +31,7 @@ auto Member::type() const -> const Value& {
|
||||
}
|
||||
|
||||
auto Member::declaration() const -> std::optional<Nonnull<const Declaration*>> {
|
||||
if (const Declaration* decl = member_.dyn_cast<const Declaration*>()) {
|
||||
if (const auto* decl = member_.dyn_cast<const Declaration*>()) {
|
||||
return decl;
|
||||
}
|
||||
return std::nullopt;
|
||||
|
||||
Reference in New Issue
Block a user