mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Run clang-tidy on headers (#3572)
This patches bazel_clang_tidy handling of headers. I found an equivalent change at https://github.com/erenon/bazel_clang_tidy/pull/13, but that was [already rejected](https://github.com/erenon/bazel_clang_tidy/pull/13#issuecomment-1047007424). Per the criticism, this will result in redundant processing of headers. The project instead uses `HeaderFilterRegex: ".*"`, but that results in two problems: 1. When running with `-k`, errors are repeated when a header is included more than once, which is common. 2. clang-tidy including errors from headers that are included from other modules (e.g., abseil-cpp); filtering correctly is difficult. Given the trade-offs and options (including forking), I thought patching was preferable so long as it remains narrow.
This commit is contained in:
@@ -34,6 +34,6 @@ InitLLVM::InitLLVM(int& argc, char**& argv)
|
||||
}
|
||||
}
|
||||
|
||||
auto (*InitLLVM::InitializeTargets)() -> void = nullptr;
|
||||
InitLLVM::InitializeTargetsFn* InitLLVM::InitializeTargets = nullptr;
|
||||
|
||||
} // namespace Carbon
|
||||
|
||||
Reference in New Issue
Block a user