clang-tools 22.0.0git
|
Finds cases where 1 is added to the string in the argument to a function / in the strlen() family instead of the result and value is used as an argument to a memory allocation function. More...
#include <MisplacedOperatorInStrlenInAllocCheck.h>
Public Member Functions | |
MisplacedOperatorInStrlenInAllocCheck (StringRef Name, ClangTidyContext *Context) | |
void | registerMatchers (ast_matchers::MatchFinder *Finder) override |
void | check (const ast_matchers::MatchFinder::MatchResult &Result) override |
Finds cases where 1 is added to the string in the argument to a function / in the strlen() family instead of the result and value is used as an argument to a memory allocation function.
For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/misplaced-operator-in-strlen-in-alloc.html
Definition at line 22 of file MisplacedOperatorInStrlenInAllocCheck.h.
|
inline |
Definition at line 24 of file MisplacedOperatorInStrlenInAllocCheck.h.
|
override |
Definition at line 71 of file MisplacedOperatorInStrlenInAllocCheck.cpp.
|
override |
Definition at line 18 of file MisplacedOperatorInStrlenInAllocCheck.cpp.