clang-tools 22.0.0git
|
Finds those signed char -> integer conversions which might indicate a / programming error. More...
#include <SignedCharMisuseCheck.h>
Public Member Functions | |
SignedCharMisuseCheck (StringRef Name, ClangTidyContext *Context) | |
void | storeOptions (ClangTidyOptions::OptionMap &Opts) override |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
Finds those signed char -> integer conversions which might indicate a / programming error.
The basic problem with the signed char, that it might store the non-ASCII characters as negative values. This behavior can cause a misunderstanding of the written code both when an explicit and when an implicit conversion happens.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/signed-char-misuse.html
Definition at line 24 of file SignedCharMisuseCheck.h.
clang::tidy::bugprone::SignedCharMisuseCheck::SignedCharMisuseCheck | ( | StringRef | Name, |
ClangTidyContext * | Context ) |
Definition at line 21 of file SignedCharMisuseCheck.cpp.
|
override |
Definition at line 130 of file SignedCharMisuseCheck.cpp.
References clang::tidy::bugprone::UnsignedASCIIUpperBound.
|
override |
Definition at line 69 of file SignedCharMisuseCheck.cpp.
|
override |
Definition at line 28 of file SignedCharMisuseCheck.cpp.