14 #ifndef LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
15 #define LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
19 #include "llvm/ADT/SmallVector.h"
31 class CondDirectiveLoc {
37 : Loc(Loc), RegionLoc(RegionLoc) {}
47 const CondDirectiveLoc &RHS) {
59 typedef std::vector<CondDirectiveLoc> CondDirectiveLocsTy;
61 CondDirectiveLocsTy CondDirectiveLocs;
63 void addCondDirectiveLoc(CondDirectiveLoc DirLoc);
103 #endif // LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
PPConditionalDirectiveRecord(SourceManager &SM)
Construct a new preprocessing record.
A description of the current definition of a macro.
bool rangeIntersectsConditionalDirective(SourceRange Range) const
Returns true if the given range intersects with a conditional directive. if a #if/#endif block is ful...
This interface provides a way to observe the actions of the preprocessor as it does its thing...
size_t getTotalMemory() const
bool isBeforeInTranslationUnit(SourceLocation LHS, SourceLocation RHS) const
Determines the order of 2 source locations in the translation unit.
SourceManager & getSourceManager() const
bool areInDifferentConditionalDirectiveRegion(SourceLocation LHS, SourceLocation RHS) const
Returns true if the given locations are in different regions, separated by conditional directive bloc...
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
Records preprocessor conditional directive regions and allows querying in which region source locatio...
SourceLocation findConditionalDirectiveRegionLoc(SourceLocation Loc) const
bool operator()(SourceLocation LHS, const CondDirectiveLoc &RHS)
Defines the PPCallbacks interface.
Defines the clang::SourceLocation class and associated facilities.
bool operator()(const CondDirectiveLoc &LHS, const CondDirectiveLoc &RHS)
A trivial tuple used to represent a source range.
This class handles loading and caching of source files into memory.
bool operator()(const CondDirectiveLoc &LHS, SourceLocation RHS)