forked from OSchip/llvm-project
d2e8fb3318
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 |
||
---|---|---|
.. | ||
Headers | ||
absl | ||
altera-kernel-name-restriction | ||
bugprone-argument-comment | ||
bugprone-not-null-terminated-result | ||
bugprone-reserved-identifier | ||
gtest | ||
llvmlibc | ||
modernize-concat-nested-namespaces | ||
modernize-deprecated-headers | ||
modernize-loop-convert | ||
modernize-pass-by-value | ||
modernize-replace-auto-ptr | ||
modernize-smart-ptr | ||
modernize-use-auto | ||
modernize-use-using | ||
mpi-type-mismatch | ||
objc-assert | ||
performance-unnecessary-value-param | ||
portability-restrict-system-includes | ||
readability-duplicate-include | ||
readability-identifier-naming | ||
readability-static-accessed-through-instance | ||
google-namespaces.h | ||
unused-using-decls.h |