JonasToth added inline comments.
================ Comment at: clang-tidy/readability/NumericalCostantsToMaxIntCheck.cpp:63 + const auto *Lit = Result.Nodes.getNodeAs<IntegerLiteral>("Literal"); + assert(Decl != nullptr); + std::string InsteadOf = "-1"; ---------------- please assert `Lit` as well and add an error message in the assert, like `assert(Decl && Lit && "Expect both matchers to match");` ================ Comment at: docs/clang-tidy/checks/readability-numerical-costants-to-max-int.rst:45 + is `llvm`. \ No newline at end of file ---------------- Please remove the empty line at the end ================ Comment at: test/clang-tidy/readability-numerical-costants-to-max-int.cpp:72 +unsigned char Uval27 = ~0; + +#define UNSIGNED unsigned ---------------- Please add tests that use typedefs (and `using = ...`) to mask the underlying type. If they dont work, use `hasCanonicalType` in the matcher, as the canonical type looks through the typedefs. Common typedefs are `uint32_t` and the like to control the bitwidth of the integer. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52892 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits