clang API Documentation
Records preprocessor conditional directive regions and allows querying in which region source locations belong to. More...
#include <PPConditionalDirectiveRecord.h>


Classes | |
| class | CondDirectiveLoc |
Public Member Functions | |
| PPConditionalDirectiveRecord (SourceManager &SM) | |
| Construct a new preprocessing record. | |
| size_t | getTotalMemory () const |
| SourceManager & | getSourceManager () const |
| bool | rangeIntersectsConditionalDirective (SourceRange Range) const |
| Returns true if the given range intersects with a conditional directive. if a #if/#endif block is fully contained within the range, this function will return false. | |
| bool | areInDifferentConditionalDirectiveRegion (SourceLocation LHS, SourceLocation RHS) const |
| Returns true if the given locations are in different regions, separated by conditional directive blocks. | |
| SourceLocation | findConditionalDirectiveRegionLoc (SourceLocation Loc) const |
Records preprocessor conditional directive regions and allows querying in which region source locations belong to.
Definition at line 26 of file PPConditionalDirectiveRecord.h.
| PPConditionalDirectiveRecord::PPConditionalDirectiveRecord | ( | SourceManager & | SM | ) | [explicit] |
Construct a new preprocessing record.
Definition at line 19 of file PPConditionalDirectiveRecord.cpp.
| bool clang::PPConditionalDirectiveRecord::areInDifferentConditionalDirectiveRegion | ( | SourceLocation | LHS, |
| SourceLocation | RHS | ||
| ) | const [inline] |
Returns true if the given locations are in different regions, separated by conditional directive blocks.
Definition at line 80 of file PPConditionalDirectiveRecord.h.
References findConditionalDirectiveRegionLoc().
Referenced by clang::edit::Commit::insertFromRange().
| SourceLocation PPConditionalDirectiveRecord::findConditionalDirectiveRegionLoc | ( | SourceLocation | Loc | ) | const |
Definition at line 48 of file PPConditionalDirectiveRecord.cpp.
References clang::SourceManager::isBeforeInTranslationUnit(), and clang::SourceLocation::isInvalid().
Referenced by areInDifferentConditionalDirectiveRegion().
| SourceManager& clang::PPConditionalDirectiveRecord::getSourceManager | ( | ) | const [inline] |
Definition at line 71 of file PPConditionalDirectiveRecord.h.
Definition at line 120 of file PPConditionalDirectiveRecord.cpp.
Returns true if the given range intersects with a conditional directive. if a #if/#endif block is fully contained within the range, this function will return false.
Definition at line 24 of file PPConditionalDirectiveRecord.cpp.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), clang::SourceManager::isBeforeInTranslationUnit(), and clang::SourceRange::isInvalid().