PiotrZSL added inline comments.
================ Comment at: clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp:69 void StringConstructorCheck::registerMatchers(MatchFinder *Finder) { + const auto SignedCharType = qualType(isAnyCharacter(), isSignedInteger()); const auto ZeroExpr = expr(ignoringParenImpCasts(integerLiteral(equals(0)))); ---------------- this may incorrectly work also for signed char, we want it work only for char and wchat_t, not signed char, unsigned char, signed wchar_t, unsigned wchar_t. So this still need some work. I would say new "isAnyCharacter" need to be created. ================ Comment at: clang-tools-extra/clang-tidy/bugprone/StringConstructorCheck.cpp:96 + const auto NonCharacterInteger = + qualType(isInteger(), unless(isAnyCharacter())); + const auto CharToIntCastExpr = implicitCastExpr( ---------------- Similar could be here, we consider std::uint8_t and std::sint8_t as integers, not as an characters, same with signed char, unsigned char Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143971/new/ https://reviews.llvm.org/D143971 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits