clang-tools 22.0.0git
clang::tidy::bugprone::SuspiciousReallocUsageCheck Class Reference

Finds usages of realloc where the return value is assigned to the same variable as passed to the first argument. More...

#include <SuspiciousReallocUsageCheck.h>

Inheritance diagram for clang::tidy::bugprone::SuspiciousReallocUsageCheck:
[legend]

Public Member Functions

 SuspiciousReallocUsageCheck (StringRef Name, ClangTidyContext *Context)
void registerMatchers (ast_matchers::MatchFinder *Finder) override
void check (const ast_matchers::MatchFinder::MatchResult &Result) override

Detailed Description

Finds usages of realloc where the return value is assigned to the same variable as passed to the first argument.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/suspicious-realloc-usage.html

Definition at line 21 of file SuspiciousReallocUsageCheck.h.

Constructor & Destructor Documentation

◆ SuspiciousReallocUsageCheck()

clang::tidy::bugprone::SuspiciousReallocUsageCheck::SuspiciousReallocUsageCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file SuspiciousReallocUsageCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::bugprone::SuspiciousReallocUsageCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

Definition at line 124 of file SuspiciousReallocUsageCheck.cpp.

◆ registerMatchers()

void clang::tidy::bugprone::SuspiciousReallocUsageCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 106 of file SuspiciousReallocUsageCheck.cpp.


The documentation for this class was generated from the following files: