Commit Graph

5 Commits

Author SHA1 Message Date
Nikolas Klauser
7aef4a0cae [libc++] Enable more clang-tidy checks and list potential candidates
These are some checks that make sense in libc++ IMO. The checks after `#TODO: investigate these checks` are candidates, but they can't be enabled without some cleanup.

Reviewed By: ldionne, #libc

Spies: aheejin, libcxx-commits

Differential Revision: https://reviews.llvm.org/D120925
2022-03-08 14:14:55 +01:00
Nikolas Klauser
bd44174547 [libc++] Use -I instead of -isystem to include headers in the test suite
Using -isystem marks the headers as system headers, which means that we
don't actually get all the warnings that we'd normally get if we included
the headers as user headers.

The goal of the test suite is normally to mirror as closely as possible
how users would use the library. Technically, this change goes against
that philosophy, since users should be using `-isystem` (if they ever
need to specify the libc++ path explicitly, which should be a rare
occurence). However, I believe fishing out additional warnings from
the headers provides more value, hence this change. Ideally, we'd be
able to still use `-isystem`, but instruct Clang to still emit warnings
from the libc++ headers (e.g. we could tell Clang to emit warnings in
any file inside `<...>/usr/include/c++/v1`).

Reviewed By: #libc, ldionne, #libc_abi

Spies: Mordante, EricWF, mstorsjo, mgorny, aheejin, arichardson, philnik, jloser, libcxx-commits

Differential Revision: https://reviews.llvm.org/D118616
2022-03-03 13:19:47 +01:00
Nikolas Klauser
f10909a508 [libc++][test] Run clang-tidy during CI
I'm trying to get libc++ to the point of being able to run clang-tidy. This is a PR to see if clang-tidy is happy with all the CI configs.

Reviewed By: Quuxplusone, ldionne, #libc

Spies: mgorny, aheejin, libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D117174
2022-02-16 00:22:08 +01:00
Nikolas Klauser
f50be8eb0a [libc++][NFC] Disable clang-tidy checks
Disable clang-tidy checks as discussed in D114915

Reviewed By: ldionne, #libc

Spies: cjdb, aheejin, libcxx-commits

Differential Revision: https://reviews.llvm.org/D114985
2021-12-06 01:51:23 +01:00
Nikolas Klauser
1ff87ec235 [libc++] [NFC] Disable clang-tidy's readability-identifier-naming check
In libc++ most of the names are not conforming to the llvm style. Removing the readability-identifier-naming check removes almost all clang-tidy warnings. For example in `<string>` the warning count goes from 1001 warnings down to 7.

Reviewed By: #libc, Mordante, ldionne

Spies: Mordante, Quuxplusone, aheejin, libcxx-commits, carlosgalvezp

Differential Revision: https://reviews.llvm.org/D113849
2021-11-16 20:14:07 +01:00