clang-tools 22.0.0git
clang::tidy::readability::AvoidUnconditionalPreprocessorIfCheck Class Reference

Finds code blocks that are constantly enabled or disabled in preprocessor directives by analyzing #if conditions, such as #if 0 and #if 1, etc. More...

#include <AvoidUnconditionalPreprocessorIfCheck.h>

Inheritance diagram for clang::tidy::readability::AvoidUnconditionalPreprocessorIfCheck:
[legend]

Public Member Functions

 AvoidUnconditionalPreprocessorIfCheck (StringRef Name, ClangTidyContext *Context)
void registerPPCallbacks (const SourceManager &SM, Preprocessor *PP, Preprocessor *ModuleExpanderPP) override

Detailed Description

Finds code blocks that are constantly enabled or disabled in preprocessor directives by analyzing #if conditions, such as #if 0 and #if 1, etc.

For the user-facing documentation see: https://clang.llvm.org/extra/clang-tidy/checks/readability/avoid-unconditional-preprocessor-if.html

Definition at line 21 of file AvoidUnconditionalPreprocessorIfCheck.h.

Constructor & Destructor Documentation

◆ AvoidUnconditionalPreprocessorIfCheck()

clang::tidy::readability::AvoidUnconditionalPreprocessorIfCheck::AvoidUnconditionalPreprocessorIfCheck ( StringRef Name,
ClangTidyContext * Context )
inline

Definition at line 23 of file AvoidUnconditionalPreprocessorIfCheck.h.

Member Function Documentation

◆ registerPPCallbacks()

void clang::tidy::readability::AvoidUnconditionalPreprocessorIfCheck::registerPPCallbacks ( const SourceManager & SM,
Preprocessor * PP,
Preprocessor * ModuleExpanderPP )
override

Definition at line 98 of file AvoidUnconditionalPreprocessorIfCheck.cpp.


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