aaron.ballman added a comment. What do you think about code like:
#if FOO == 4 #if FOO == 4 #endif #endif #if defined(FOO) #if defined(FOO) #endif #endif #if !defined(FOO) #if !defined(FOO) #endif #endif #if defined(FOO) #if !defined(FOO) #endif #endif #if !defined(FOO) #if defined(FOO) #endif #endif ================ Comment at: clang-tidy/readability/CMakeLists.txt:23 ReadabilityTidyModule.cpp + RedundantPreprocessorCheck.cpp RedundantControlFlowCheck.cpp ---------------- Please keep this list sorted alphabetically. ================ Comment at: clang-tidy/readability/RedundantPreprocessorCheck.cpp:52 +private: + void Startif(SourceLocation Loc, const Token &MacroNameTok, + SmallVector<Entry, 4> &Stack, StringRef Warning, ---------------- This name is not particularly descriptive. This seems to be more like `CheckMacroRedundancy` or something like that? ================ Comment at: clang-tidy/readability/RedundantPreprocessorCheck.h:1-2 +//===--- RedundantPreprocessorCheck.h - clang-tidy -----------------------*- C++ +//-*-===// +// ---------------- This comment should be re-flowed to fit the column width. ================ Comment at: clang-tidy/readability/RedundantPreprocessorCheck.h:20 + +/// This check flags redundant preprocessor usage. +/// ---------------- What constitutes "redundancy"? A bit more exposition here would be useful. https://reviews.llvm.org/D54349 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits