forked from OSchip/llvm-project
[libclang] Rename VisitIncludedPreprocessingEntries -> VisitIncludedEntities
llvm-svn: 143337
This commit is contained in:
parent
9821e75e64
commit
f3068a73f7
|
@ -193,9 +193,9 @@ class CursorVisitor : public DeclVisitor<CursorVisitor, bool>,
|
||||||
/// after visiting other declarations.
|
/// after visiting other declarations.
|
||||||
bool VisitPreprocessorLast;
|
bool VisitPreprocessorLast;
|
||||||
|
|
||||||
/// \brief Whether we should visit the preprocessing record entries that are
|
/// \brief Whether we should visit declarations or preprocessing record
|
||||||
/// #included inside the \arg RegionOfInterest.
|
/// entries that are #included inside the \arg RegionOfInterest.
|
||||||
bool VisitIncludedPreprocessingEntries;
|
bool VisitIncludedEntities;
|
||||||
|
|
||||||
/// \brief When valid, a source range to which the cursor should restrict
|
/// \brief When valid, a source range to which the cursor should restrict
|
||||||
/// its search.
|
/// its search.
|
||||||
|
@ -249,7 +249,7 @@ public:
|
||||||
: TU(TU), AU(static_cast<ASTUnit*>(TU->TUData)),
|
: TU(TU), AU(static_cast<ASTUnit*>(TU->TUData)),
|
||||||
Visitor(Visitor), ClientData(ClientData),
|
Visitor(Visitor), ClientData(ClientData),
|
||||||
VisitPreprocessorLast(VisitPreprocessorLast),
|
VisitPreprocessorLast(VisitPreprocessorLast),
|
||||||
VisitIncludedPreprocessingEntries(VisitIncludedPreprocessingEntries),
|
VisitIncludedEntities(VisitIncludedPreprocessingEntries),
|
||||||
RegionOfInterest(RegionOfInterest), DI_current(0)
|
RegionOfInterest(RegionOfInterest), DI_current(0)
|
||||||
{
|
{
|
||||||
Parent.kind = CXCursor_NoDeclFound;
|
Parent.kind = CXCursor_NoDeclFound;
|
||||||
|
@ -274,8 +274,8 @@ public:
|
||||||
|
|
||||||
bool visitPreprocessedEntitiesInRegion();
|
bool visitPreprocessedEntitiesInRegion();
|
||||||
|
|
||||||
bool shouldVisitIncludedPreprocessingEntries() const {
|
bool shouldVisitIncludedEntities() const {
|
||||||
return VisitIncludedPreprocessingEntries;
|
return VisitIncludedEntities;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename InputIterator>
|
template<typename InputIterator>
|
||||||
|
@ -417,7 +417,7 @@ static bool visitPreprocessedEntitiesInRange(SourceRange R,
|
||||||
SourceManager &SM = Visitor.getASTUnit()->getSourceManager();
|
SourceManager &SM = Visitor.getASTUnit()->getSourceManager();
|
||||||
FileID FID;
|
FileID FID;
|
||||||
|
|
||||||
if (!Visitor.shouldVisitIncludedPreprocessingEntries()) {
|
if (!Visitor.shouldVisitIncludedEntities()) {
|
||||||
// If the begin/end of the range lie in the same FileID, do the optimization
|
// If the begin/end of the range lie in the same FileID, do the optimization
|
||||||
// where we skip preprocessed entities that do not come from the same FileID.
|
// where we skip preprocessed entities that do not come from the same FileID.
|
||||||
FID = SM.getFileID(R.getBegin());
|
FID = SM.getFileID(R.getBegin());
|
||||||
|
@ -3974,7 +3974,7 @@ CXCursor cxcursor::getCursor(CXTranslationUnit TU, SourceLocation SLoc) {
|
||||||
CXCursor Parent = clang_getTranslationUnitCursor(TU);
|
CXCursor Parent = clang_getTranslationUnitCursor(TU);
|
||||||
CursorVisitor CursorVis(TU, GetCursorVisitor, &ResultData,
|
CursorVisitor CursorVis(TU, GetCursorVisitor, &ResultData,
|
||||||
/*VisitPreprocessorLast=*/true,
|
/*VisitPreprocessorLast=*/true,
|
||||||
/*VisitIncludedPreprocessingEntries=*/false,
|
/*VisitIncludedEntities=*/false,
|
||||||
SourceLocation(SLoc));
|
SourceLocation(SLoc));
|
||||||
CursorVis.VisitChildren(Parent);
|
CursorVis.VisitChildren(Parent);
|
||||||
}
|
}
|
||||||
|
@ -4804,7 +4804,7 @@ public:
|
||||||
AnnotateVis(tu,
|
AnnotateVis(tu,
|
||||||
AnnotateTokensVisitor, this,
|
AnnotateTokensVisitor, this,
|
||||||
/*VisitPreprocessorLast=*/true,
|
/*VisitPreprocessorLast=*/true,
|
||||||
/*VisitIncludedPreprocessingEntries=*/false,
|
/*VisitIncludedEntities=*/false,
|
||||||
RegionOfInterest),
|
RegionOfInterest),
|
||||||
SrcMgr(static_cast<ASTUnit*>(tu->TUData)->getSourceManager()),
|
SrcMgr(static_cast<ASTUnit*>(tu->TUData)->getSourceManager()),
|
||||||
HasContextSensitiveKeywords(false) { }
|
HasContextSensitiveKeywords(false) { }
|
||||||
|
@ -5281,7 +5281,7 @@ static void clang_annotateTokensImpl(void *UserData) {
|
||||||
CursorVisitor MacroArgMarker(TU,
|
CursorVisitor MacroArgMarker(TU,
|
||||||
MarkMacroArgTokensVisitorDelegate, &Visitor,
|
MarkMacroArgTokensVisitorDelegate, &Visitor,
|
||||||
/*VisitPreprocessorLast=*/true,
|
/*VisitPreprocessorLast=*/true,
|
||||||
/*VisitIncludedPreprocessingEntries=*/false,
|
/*VisitIncludedEntities=*/false,
|
||||||
RegionOfInterest);
|
RegionOfInterest);
|
||||||
MacroArgMarker.visitPreprocessedEntitiesInRegion();
|
MacroArgMarker.visitPreprocessedEntitiesInRegion();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue