aaron.ballman added inline comments.
================ Comment at: clang-tidy/readability/RedundantPreprocessorCheck.cpp:37 + CheckMacroRedundancy(Loc, Condition, IfStack, + "nested redundant if; consider removing it", + "previous if was here", true); ---------------- I think these diagnostics should be hoisted as private constant members of the class. Something like: `nested redundant %select{#if|#ifdef|#ifndef}0; consider removing it"` and `previous %select{#if|#ifdef|#ifndef}0 here` ================ Comment at: test/clang-tidy/readability-redundant-preprocessor.cpp:45 +// CHECK-NOTES: [[@LINE+1]]:2: warning: nested redundant if; consider removing it [readability-redundant-preprocessor] +#if FOO == 4 +// CHECK-NOTES: [[@LINE-3]]:2: note: previous if was here ---------------- Can you add a test like `#if FOO == 3 + 1` as well? https://reviews.llvm.org/D54349 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits