Cleanup or suppress numerous clang-tidy issues. (#577)

This gets us to a nearly clean state across the toolchain. A couple of
these are checks that I don't think we want to try to rigidly use and
I've disabled them completely. Others I've added relevant `NOLINT` style
suppressions or applied the automatic fix suggested by `clang-tidy`.

The implicit conversions that are allowed here with `NOLINT` are
probably worth at least a tiny bit of scrutiny to see if we could
replace the construct with something more direct without undue effort
and no longer need the implicit conversion. But until then, it seemed
fine to suppress.
This commit is contained in:
Chandler Carruth
2021-06-14 19:46:49 -07:00
committed by GitHub
parent 1b122924e8
commit a857b7ea1a
16 changed files with 60 additions and 47 deletions
+3
View File
@@ -61,6 +61,9 @@ auto SourceBuffer::CreateFromFile(llvm::StringRef filename)
MAP_PRIVATE | MAP_POPULATE,
#endif
file_descriptor, /*offset=*/0);
// The `MAP_FAILED` macro may expand to a cast to pointer that `clang-tidy`
// complains about.
// NOLINTNEXTLINE(performance-no-int-to-ptr)
if (mapped_text == MAP_FAILED) {
return ErrnoToError(errno);
}