Go to the documentation of this file.
13 #ifndef LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
14 #define LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
18 #include "llvm/ADT/SmallVector.h"
30 class CondDirectiveLoc {
36 : Loc(Loc), RegionLoc(RegionLoc) {}
46 const CondDirectiveLoc &RHS) {
47 return SM.isBeforeInTranslationUnit(LHS.getLoc(), RHS.getLoc());
50 return SM.isBeforeInTranslationUnit(LHS.getLoc(), RHS);
53 return SM.isBeforeInTranslationUnit(LHS, RHS.getLoc());
58 typedef std::vector<CondDirectiveLoc> CondDirectiveLocsTy;
60 CondDirectiveLocsTy CondDirectiveLocs;
62 void addCondDirectiveLoc(CondDirectiveLoc DirLoc);
110 #endif // LLVM_CLANG_LEX_PPCONDITIONALDIRECTIVERECORD_H
bool rangeIntersectsConditionalDirective(SourceRange Range) const
Returns true if the given range intersects with a conditional directive.
A trivial tuple used to represent a source range.
A description of the current definition of a macro.
Encodes a location in the source.
This interface provides a way to observe the actions of the preprocessor as it does its thing.
bool operator()(const CondDirectiveLoc &LHS, const CondDirectiveLoc &RHS)
Token - This structure provides full information about a lexed token.
This class handles loading and caching of source files into memory.
bool operator()(const CondDirectiveLoc &LHS, SourceLocation RHS)
PPConditionalDirectiveRecord(SourceManager &SM)
Construct a new preprocessing record.
SourceLocation findConditionalDirectiveRegionLoc(SourceLocation Loc) const
bool areInDifferentConditionalDirectiveRegion(SourceLocation LHS, SourceLocation RHS) const
Returns true if the given locations are in different regions, separated by conditional directive bloc...
Records preprocessor conditional directive regions and allows querying in which region source locatio...
size_t getTotalMemory() const
bool operator()(SourceLocation LHS, const CondDirectiveLoc &RHS)
SourceManager & getSourceManager() const