LegalizeAdulthood added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/modernize/MacroToEnumCheck.cpp:182 + MD->getMacroInfo()->isUsedForHeaderGuard() || + MD->getMacroInfo()->isBuiltinMacro() || ConditionScope > 0) + return; ---------------- LegalizeAdulthood wrote: > njames93 wrote: > > This `ConditionScope` checks looks like it would prevent warning in header > > files that use a header guard(instead of pragma once) to prevent multiple > > inclusion. > Oh, good catch, you're probably right. I'll test that manually. > > (Gee, another case where we need `check_clang_tidy.py` to validate > changes to header files! This keeps coming up! My implementation > of this from several years ago died in review hell and was never born.) Any ideas for an algorithm that detects a header guard condition from some other condition? I don't see anything obvious. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117522/new/ https://reviews.llvm.org/D117522 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits