[PATCH] Add readability-redundant-include check to clang-tidy

Richard legalize at xmission.com
Sat Mar 7 17:29:56 PST 2015


================
Comment at: clang-tidy/readability/CMakeLists.txt:10
@@ -9,2 +9,3 @@
   ReadabilityTidyModule.cpp
+  RedundantInclude.cpp
   RedundantSmartptrGet.cpp
----------------
alexfh wrote:
> I'm not a native speaker, but I have a feeling that "duplicate" is a more suitable word here than "redundant". WDYT?
Fixed.

================
Comment at: clang-tidy/readability/RedundantInclude.h:22
@@ +21,3 @@
+///
+/// Any change in the defined macros in the main file between \c #include
+/// directives resets the list of includes used to check for duplicates.
----------------
alexfh wrote:
> This description is somewhat confusing. Maybe something along the lines of "Only consecutive #include directives without any other preprocessor directives between them are analyzed"?
Fixed.

http://reviews.llvm.org/D7982

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list