clang-tools 22.0.0git
clang::tidy::misc::MisplacedConstCheck Class Reference

This check diagnoses when a const qualifier is applied to a typedef to a pointer type rather than to the pointee. More...

#include <MisplacedConstCheck.h>

Inheritance diagram for clang::tidy::misc::MisplacedConstCheck:
[legend]

Public Member Functions

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

Detailed Description

This check diagnoses when a const qualifier is applied to a typedef to a pointer type rather than to the pointee.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/misc/misplaced-const.html

Definition at line 21 of file MisplacedConstCheck.h.

Constructor & Destructor Documentation

◆ MisplacedConstCheck()

clang::tidy::misc::MisplacedConstCheck::MisplacedConstCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file MisplacedConstCheck.h.

Member Function Documentation

◆ check()

void clang::tidy::misc::MisplacedConstCheck::check ( const ast_matchers::MatchFinder::MatchResult & Result)
override

◆ registerMatchers()

void clang::tidy::misc::MisplacedConstCheck::registerMatchers ( ast_matchers::MatchFinder * Finder)
override

Definition at line 17 of file MisplacedConstCheck.cpp.


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