clang-tools  14.0.0git
Classes | Typedefs | Functions | Variables
clang::pp_trace Namespace Reference

Classes

struct  Argument
 
class  CallbackCall
 This class represents one callback call by name and an array of arguments. More...
 
class  PPCallbacksTracker
 This class overrides the PPCallbacks class for tracking preprocessor activity by means of its callback functions. More...
 

Typedefs

using FilterType = std::vector< std::pair< llvm::GlobPattern, bool > >
 

Functions

static std::string getSourceLocationString (Preprocessor &PP, SourceLocation Loc)
 
static cl::OptionCategory Cat ("pp-trace options")
 
static cl::opt< std::string > Callbacks ("callbacks", cl::init("*"), cl::desc("Comma-separated list of globs describing the list of callbacks " "to output. Globs are processed in order of appearance. Globs " "with the '-' prefix remove callbacks from the set. e.g. " "'*,-Macro*'."), cl::cat(Cat))
 
static cl::opt< std::string > OutputFileName ("output", cl::init("-"), cl::desc("Output trace to the given file name or '-' for stdout."), cl::cat(Cat))
 
static void error (Twine Message)
 

Variables

static const char *const FileChangeReasonStrings []
 
static const char *const CharacteristicKindStrings []
 
static const char *const MacroDirectiveKindStrings []
 
static const char *const PragmaIntroducerKindStrings []
 
static const char *const PragmaMessageKindStrings []
 
static const char *const PragmaWarningSpecifierStrings []
 
static const char *const ConditionValueKindStrings []
 
static const char *const MappingStrings []
 

Typedef Documentation

◆ FilterType

using clang::pp_trace::FilterType = typedef std::vector<std::pair<llvm::GlobPattern, bool> >

Definition at line 55 of file PPCallbacksTracker.h.

Function Documentation

◆ Callbacks()

static cl::opt<std::string> clang::pp_trace::Callbacks ( "callbacks"  ,
cl::init("*")  ,
cl::desc("Comma-separated list of globs describing the list of callbacks " "to output. Globs are processed in order of appearance. Globs " "with the '-' prefix remove callbacks from the set. e.g. " "'*,-Macro*'.")  ,
cl::cat(Cat  
)
static

◆ Cat()

static cl::OptionCategory clang::pp_trace::Cat ( "pp-trace options"  )
static

Referenced by main(), and clang::clangd::TEST().

◆ error()

static void clang::pp_trace::error ( Twine  Message)
static

Definition at line 72 of file PPTrace.cpp.

References clang::tidy::bugprone::Message.

Referenced by main().

◆ getSourceLocationString()

static std::string clang::pp_trace::getSourceLocationString ( Preprocessor &  PP,
SourceLocation  Loc 
)
static

◆ OutputFileName()

static cl::opt<std::string> clang::pp_trace::OutputFileName ( "output"  ,
cl::init("-")  ,
cl::desc("Output trace to the given file name or '-' for stdout.")  ,
cl::cat(Cat  
)
static

Variable Documentation

◆ CharacteristicKindStrings

const char* const clang::pp_trace::CharacteristicKindStrings[]
static
Initial value:
= { "C_User", "C_System",
"C_ExternCSystem" }

Definition at line 63 of file PPCallbacksTracker.cpp.

Referenced by clang::pp_trace::PPCallbacksTracker::FileChanged(), and clang::pp_trace::PPCallbacksTracker::FileSkipped().

◆ ConditionValueKindStrings

const char* const clang::pp_trace::ConditionValueKindStrings[]
static
Initial value:
= {
"CVK_NotEvaluated", "CVK_False", "CVK_True"
}

Definition at line 88 of file PPCallbacksTracker.cpp.

Referenced by clang::pp_trace::PPCallbacksTracker::Elif(), and clang::pp_trace::PPCallbacksTracker::If().

◆ FileChangeReasonStrings

const char* const clang::pp_trace::FileChangeReasonStrings[]
static
Initial value:
= {
"EnterFile", "ExitFile", "SystemHeaderPragma", "RenameFile"
}

Definition at line 58 of file PPCallbacksTracker.cpp.

Referenced by clang::pp_trace::PPCallbacksTracker::FileChanged().

◆ MacroDirectiveKindStrings

const char* const clang::pp_trace::MacroDirectiveKindStrings[]
static
Initial value:
= {
"MD_Define","MD_Undefine", "MD_Visibility"
}

Definition at line 67 of file PPCallbacksTracker.cpp.

Referenced by clang::pp_trace::PPCallbacksTracker::appendArgument().

◆ MappingStrings

const char* const clang::pp_trace::MappingStrings[]
static
Initial value:
= { "0", "MAP_IGNORE",
"MAP_REMARK", "MAP_WARNING",
"MAP_ERROR", "MAP_FATAL" }

Definition at line 93 of file PPCallbacksTracker.cpp.

◆ PragmaIntroducerKindStrings

const char* const clang::pp_trace::PragmaIntroducerKindStrings[]
static
Initial value:
= { "PIK_HashPragma",
"PIK__Pragma",
"PIK___pragma" }

Definition at line 72 of file PPCallbacksTracker.cpp.

Referenced by clang::pp_trace::PPCallbacksTracker::PragmaDirective().

◆ PragmaMessageKindStrings

const char* const clang::pp_trace::PragmaMessageKindStrings[]
static
Initial value:
= {
"PMK_Message", "PMK_Warning", "PMK_Error"
}

Definition at line 77 of file PPCallbacksTracker.cpp.

◆ PragmaWarningSpecifierStrings

const char* const clang::pp_trace::PragmaWarningSpecifierStrings[]
static
Initial value:
= {
"PWS_Default", "PWS_Disable", "PWS_Error", "PWS_Once", "PWS_Suppress",
"PWS_Level1", "PWS_Level2", "PWS_Level3", "PWS_Level4",
}

Definition at line 82 of file PPCallbacksTracker.cpp.

Referenced by clang::pp_trace::PPCallbacksTracker::PragmaWarning().