summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexBody.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/IndexBody.cpp')
-rw-r--r--clang/tools/libclang/IndexBody.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/clang/tools/libclang/IndexBody.cpp b/clang/tools/libclang/IndexBody.cpp
index bac7e02514b..177cad7ccaa 100644
--- a/clang/tools/libclang/IndexBody.cpp
+++ b/clang/tools/libclang/IndexBody.cpp
@@ -10,7 +10,6 @@
#include "IndexingContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
-#include "clang/Analysis/Support/SaveAndRestore.h"
using namespace clang;
using namespace cxindex;
@@ -21,14 +20,12 @@ class BodyIndexer : public RecursiveASTVisitor<BodyIndexer> {
IndexingContext &IndexCtx;
const NamedDecl *Parent;
const DeclContext *ParentDC;
- bool InPseudoObject;
typedef RecursiveASTVisitor<BodyIndexer> base;
public:
BodyIndexer(IndexingContext &indexCtx,
const NamedDecl *Parent, const DeclContext *DC)
- : IndexCtx(indexCtx), Parent(Parent), ParentDC(DC),
- InPseudoObject(false) { }
+ : IndexCtx(indexCtx), Parent(Parent), ParentDC(DC) { }
bool shouldWalkTypesOfTypeLocs() const { return false; }
@@ -62,8 +59,8 @@ public:
if (ObjCMethodDecl *MD = E->getMethodDecl())
IndexCtx.handleReference(MD, E->getSelectorStartLoc(),
Parent, ParentDC, E,
- InPseudoObject ? CXIdxEntityRef_Implicit
- : CXIdxEntityRef_Direct);
+ E->isImplicit() ? CXIdxEntityRef_Implicit
+ : CXIdxEntityRef_Direct);
return true;
}
@@ -82,11 +79,6 @@ public:
return true;
}
- bool TraversePseudoObjectExpr(PseudoObjectExpr *E) {
- SaveAndRestore<bool> InPseudo(InPseudoObject, true);
- return base::TraversePseudoObjectExpr(E);
- }
-
bool VisitCXXConstructExpr(CXXConstructExpr *E) {
IndexCtx.handleReference(E->getConstructor(), E->getLocation(),
Parent, ParentDC, E);
OpenPOWER on IntegriCloud