#include "PPCallbacksTracker.h"
#include "clang/Basic/FileManager.h"
#include "clang/Lex/MacroArgs.h"
#include "llvm/Support/raw_ostream.h"
namespace clang {
namespace pp_trace {
static std::string getSourceLocationString(Preprocessor &PP,
SourceLocation Loc) { … }
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[] = …;
PPCallbacksTracker::PPCallbacksTracker(const FilterType &Filters,
std::vector<CallbackCall> &CallbackCalls,
Preprocessor &PP)
: … { … }
PPCallbacksTracker::~PPCallbacksTracker() { … }
void PPCallbacksTracker::FileChanged(SourceLocation Loc,
PPCallbacks::FileChangeReason Reason,
SrcMgr::CharacteristicKind FileType,
FileID PrevFID) { … }
void PPCallbacksTracker::FileSkipped(const FileEntryRef &SkippedFile,
const Token &FilenameTok,
SrcMgr::CharacteristicKind FileType) { … }
void PPCallbacksTracker::InclusionDirective(
SourceLocation HashLoc, const Token &IncludeTok, llvm::StringRef FileName,
bool IsAngled, CharSourceRange FilenameRange, OptionalFileEntryRef File,
llvm::StringRef SearchPath, llvm::StringRef RelativePath,
const Module *SuggestedModule, bool ModuleImported,
SrcMgr::CharacteristicKind FileType) { … }
void PPCallbacksTracker::moduleImport(SourceLocation ImportLoc,
ModuleIdPath Path,
const Module *Imported) { … }
void PPCallbacksTracker::EndOfMainFile() { … }
void PPCallbacksTracker::Ident(SourceLocation Loc, llvm::StringRef Str) { … }
void PPCallbacksTracker::PragmaDirective(SourceLocation Loc,
PragmaIntroducerKind Introducer) { … }
void PPCallbacksTracker::PragmaComment(SourceLocation Loc,
const IdentifierInfo *Kind,
llvm::StringRef Str) { … }
void PPCallbacksTracker::PragmaDetectMismatch(SourceLocation Loc,
llvm::StringRef Name,
llvm::StringRef Value) { … }
void PPCallbacksTracker::PragmaDebug(SourceLocation Loc,
llvm::StringRef DebugType) { … }
void PPCallbacksTracker::PragmaMessage(SourceLocation Loc,
llvm::StringRef Namespace,
PPCallbacks::PragmaMessageKind Kind,
llvm::StringRef Str) { … }
void PPCallbacksTracker::PragmaDiagnosticPush(SourceLocation Loc,
llvm::StringRef Namespace) { … }
void PPCallbacksTracker::PragmaDiagnosticPop(SourceLocation Loc,
llvm::StringRef Namespace) { … }
void PPCallbacksTracker::PragmaDiagnostic(SourceLocation Loc,
llvm::StringRef Namespace,
diag::Severity Mapping,
llvm::StringRef Str) { … }
void PPCallbacksTracker::PragmaOpenCLExtension(SourceLocation NameLoc,
const IdentifierInfo *Name,
SourceLocation StateLoc,
unsigned State) { … }
void PPCallbacksTracker::PragmaWarning(SourceLocation Loc,
PragmaWarningSpecifier WarningSpec,
llvm::ArrayRef<int> Ids) { … }
void PPCallbacksTracker::PragmaWarningPush(SourceLocation Loc, int Level) { … }
void PPCallbacksTracker::PragmaWarningPop(SourceLocation Loc) { … }
void PPCallbacksTracker::PragmaExecCharsetPush(SourceLocation Loc,
StringRef Str) { … }
void PPCallbacksTracker::PragmaExecCharsetPop(SourceLocation Loc) { … }
void PPCallbacksTracker::MacroExpands(const Token &MacroNameTok,
const MacroDefinition &MacroDefinition,
SourceRange Range,
const MacroArgs *Args) { … }
void PPCallbacksTracker::MacroDefined(const Token &MacroNameTok,
const MacroDirective *MacroDirective) { … }
void PPCallbacksTracker::MacroUndefined(const Token &MacroNameTok,
const MacroDefinition &MacroDefinition,
const MacroDirective *Undef) { … }
void PPCallbacksTracker::Defined(const Token &MacroNameTok,
const MacroDefinition &MacroDefinition,
SourceRange Range) { … }
void PPCallbacksTracker::SourceRangeSkipped(SourceRange Range,
SourceLocation EndifLoc) { … }
void PPCallbacksTracker::If(SourceLocation Loc, SourceRange ConditionRange,
ConditionValueKind ConditionValue) { … }
void PPCallbacksTracker::Elif(SourceLocation Loc, SourceRange ConditionRange,
ConditionValueKind ConditionValue,
SourceLocation IfLoc) { … }
void PPCallbacksTracker::Ifdef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MacroDefinition) { … }
void PPCallbacksTracker::Ifndef(SourceLocation Loc, const Token &MacroNameTok,
const MacroDefinition &MacroDefinition) { … }
void PPCallbacksTracker::Else(SourceLocation Loc, SourceLocation IfLoc) { … }
void PPCallbacksTracker::Endif(SourceLocation Loc, SourceLocation IfLoc) { … }
void PPCallbacksTracker::beginCallback(const char *Name) { … }
void PPCallbacksTracker::appendArgument(const char *Name, bool Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, int Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, const char *Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
llvm::StringRef Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
const std::string &Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, const Token &Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, int Value,
const char *const Strings[]) { … }
void PPCallbacksTracker::appendArgument(const char *Name, FileID Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
OptionalFileEntryRef Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, FileEntryRef Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
SourceLocation Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, SourceRange Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
CharSourceRange Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, ModuleIdPath Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
const IdentifierInfo *Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
const MacroDirective *Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
const MacroDefinition &Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name,
const MacroArgs *Value) { … }
void PPCallbacksTracker::appendArgument(const char *Name, const Module *Value) { … }
void PPCallbacksTracker::appendQuotedArgument(const char *Name,
const std::string &Value) { … }
void PPCallbacksTracker::appendFilePathArgument(const char *Name,
llvm::StringRef Value) { … }
llvm::StringRef PPCallbacksTracker::getSourceString(CharSourceRange Range) { … }
}
}