JonasToth added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:110 + "making it const") + << MemberVariable; // FIXME: Add fix-it hint to MemberVariable + } ---------------- missing `return`? ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-avoid-non-const-global-variables.rst:6 + +Finds non-const global variables as described in check I.2 of C++ Core +Guidelines. ---------------- I would prefer if the `I.2 of C++ Core Guidelines` is a link and to remove the link-string below this paragraph. ================ Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-avoid-non-const-global-variables.rst:29 + char * e_ptr1 = &e; // Warns! + char *const e_const_ptr // Warns! + char & e_reference = e; // Warns! ---------------- This is technically not valid code, as the pointer needs to be initialized and a `;` is missing. I think that should be fixed to not mislead inexperienced programmers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70265/new/ https://reviews.llvm.org/D70265 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits