diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-12 02:34:39 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-12 02:34:39 +0000 |
commit | a80f1bf26250fa3046940f775d96f80ac961aae4 (patch) | |
tree | 0fbbfb66779a859000ec7b0e0b83a794a39ada8f /clang/tools/libclang/IndexBody.cpp | |
parent | 7e79129d15a11b3f3017f005f755b319b5974e38 (diff) | |
download | bcm5719-llvm-a80f1bf26250fa3046940f775d96f80ac961aae4.tar.gz bcm5719-llvm-a80f1bf26250fa3046940f775d96f80ac961aae4.zip |
Add IsImplicit field in ObjCMessageExpr that is true when the message
was constructed, e.g. for a property access.
This allows the selector identifier locations machinery for ObjCMessageExpr
to function correctly, in that there are not real locations to handle/report for
such a message.
llvm-svn: 148013
Diffstat (limited to 'clang/tools/libclang/IndexBody.cpp')
-rw-r--r-- | clang/tools/libclang/IndexBody.cpp | 14 |
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); |