#include "CollectMacros.h"
#include "AST.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Tooling/Syntax/Tokens.h"
#include "llvm/ADT/STLExtras.h"
#include <cstddef>
namespace clang {
namespace clangd {
Range MacroOccurrence::toRange(const SourceManager &SM) const { … }
void CollectMainFileMacros::add(const Token &MacroNameTok, const MacroInfo *MI,
bool IsDefinition, bool InIfCondition) { … }
void CollectMainFileMacros::FileChanged(SourceLocation Loc, FileChangeReason,
SrcMgr::CharacteristicKind, FileID) { … }
void CollectMainFileMacros::MacroExpands(const Token &MacroName,
const MacroDefinition &MD,
SourceRange Range,
const MacroArgs *Args) { … }
void CollectMainFileMacros::MacroUndefined(const clang::Token &MacroName,
const clang::MacroDefinition &MD,
const clang::MacroDirective *Undef) { … }
void CollectMainFileMacros::Ifdef(SourceLocation Loc, const Token &MacroName,
const MacroDefinition &MD) { … }
void CollectMainFileMacros::Ifndef(SourceLocation Loc, const Token &MacroName,
const MacroDefinition &MD) { … }
void CollectMainFileMacros::Elifdef(SourceLocation Loc, const Token &MacroName,
const MacroDefinition &MD) { … }
void CollectMainFileMacros::Elifndef(SourceLocation Loc, const Token &MacroName,
const MacroDefinition &MD) { … }
void CollectMainFileMacros::Defined(const Token &MacroName,
const MacroDefinition &MD,
SourceRange Range) { … }
void CollectMainFileMacros::SourceRangeSkipped(SourceRange R,
SourceLocation EndifLoc) { … }
class CollectPragmaMarks : public PPCallbacks { … };
std::unique_ptr<PPCallbacks>
collectPragmaMarksCallback(const SourceManager &SM,
std::vector<PragmaMark> &Out) { … }
void CollectMainFileMacros::MacroDefined(const Token &MacroName,
const MacroDirective *MD) { … }
}
}