mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 13:31:06 +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:
@@ -37,7 +37,7 @@ class OutputSegment {
|
||||
// instead. However, most other types we intend to support as they become
|
||||
// necessary.
|
||||
template <typename T>
|
||||
static constexpr bool IsSupportedClangASTNodeType() {
|
||||
static constexpr auto IsSupportedClangASTNodeType() -> bool {
|
||||
return std::is_convertible_v<T*, clang::Stmt*> ||
|
||||
std::is_convertible_v<T*, clang::Decl*>;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class OutputSegment {
|
||||
friend struct OutputWriter;
|
||||
|
||||
template <typename T>
|
||||
T& AssertNotNull(T* ptr) {
|
||||
auto AssertNotNull(T* ptr) -> T& {
|
||||
CARBON_CHECK(ptr != nullptr);
|
||||
return *ptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user