llvm-project/clang-tools-extra/test/clang-tidy/checkers/Inputs
Richard d2e8fb3318 [clang-tidy] Add readability-duplicate-include check
Looks for duplicate includes and removes them.

Every time an include directive is processed, check a vector of filenames
to see if the included file has already been included.  If so, it issues
a warning and a replacement to remove the entire line containing the
duplicated include directive.

When a macro is defined or undefined, the vector of filenames is cleared.
This enables including the same file multiple times, but getting
different expansions based on the set of active macros at the time of
inclusion.  For example:

  #undef NDEBUG
  #include "assertion.h"
  // ...code with assertions enabled

  #define NDEBUG
  #include "assertion.h"
  // ...code with assertions disabled

Since macros are redefined between the inclusion of assertion.h,
they are not flagged as redundant.

Differential Revision: https://reviews.llvm.org/D7982
2022-01-23 09:23:04 -07:00
..
Headers [clang-tidy] Extending bugprone-signal-handler with POSIX functions. 2021-02-23 14:48:00 +01:00
absl [clang-tidy] Fix check for Abseil internal namespace access 2020-01-21 15:21:53 -05:00
altera-kernel-name-restriction Add a new altera kernel name restriction check to clang-tidy. 2020-11-09 09:26:50 -05:00
bugprone-argument-comment bugprone-argument-comment: ignore mismatches from system headers 2021-08-03 19:56:27 +00:00
bugprone-not-null-terminated-result [NFC][clang-tidy] Move recently newly-added tests into checkers/ subdir 2020-02-14 11:25:05 +03:00
bugprone-reserved-identifier
gtest
llvmlibc [clang-tidy] Merge common code between llvmlibc-restrict-system-libc-headers and portability-restrict-system-includes 2020-03-20 15:53:05 -07:00
modernize-concat-nested-namespaces [clang-tidy] Enable modernize-concat-nested-namespaces also on headers 2021-03-15 07:32:45 -07:00
modernize-deprecated-headers
modernize-loop-convert [clang-tidy] Fix a crash in modernize-loop-convert around conversion operators 2021-11-15 13:11:29 +01:00
modernize-pass-by-value
modernize-replace-auto-ptr
modernize-smart-ptr
modernize-use-auto
modernize-use-using Allow modernize-use-using to apply to enumerations as well. 2020-02-03 07:54:38 -05:00
mpi-type-mismatch
objc-assert [clang-tidy][objc] Finds and fixes improper usages of XCTAssertEquals and XCTAssertNotEquals. 2021-12-02 18:32:16 -05:00
performance-unnecessary-value-param [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
portability-restrict-system-includes [clang-tidy] Mock system headers for portability-restrict-system-includes tests. 2020-03-11 12:13:27 -07:00
readability-duplicate-include [clang-tidy] Add readability-duplicate-include check 2022-01-23 09:23:04 -07:00
readability-identifier-naming [Coroutines] [Frontend] Lookup in std namespace first 2021-11-04 11:53:47 +08:00
readability-static-accessed-through-instance [clang-tidy] Suppress readability-static-access-through-instance for CUDA built-in variables 2021-10-26 05:45:25 +00:00
google-namespaces.h
unused-using-decls.h