summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndex.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-03-02 21:06:53 +0000
committerDouglas Gregor <dgregor@apple.com>2011-03-02 21:06:53 +0000
commit25b7e05b72d7a666be3294bdad43e206f30c53ee (patch)
treed93efb62aa02e44bf993b2508dea4e9cdf53344f /clang/tools/libclang/CIndex.cpp
parentfb55f851a5165dda9265531d76f95472cd42ab82 (diff)
downloadbcm5719-llvm-25b7e05b72d7a666be3294bdad43e206f30c53ee.tar.gz
bcm5719-llvm-25b7e05b72d7a666be3294bdad43e206f30c53ee.zip
Fix the source range for a member access expression that includes a
nested-name-specifier and improve the detection of implicit 'this' bases. Fixes <rdar://problem/8750392>. llvm-svn: 126880
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
-rw-r--r--clang/tools/libclang/CIndex.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index d29e4598277..21251e09b10 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -1979,12 +1979,8 @@ void EnqueueVisitor::VisitMemberExpr(MemberExpr *M) {
// visit it.
// FIXME: If we ever want to show these implicit accesses, this will be
// unfortunate. However, clang_getCursor() relies on this behavior.
- if (CXXThisExpr *This
- = llvm::dyn_cast<CXXThisExpr>(M->getBase()->IgnoreParenImpCasts()))
- if (This->isImplicit())
- return;
-
- AddStmt(M->getBase());
+ if (!M->isImplicitAccess())
+ AddStmt(M->getBase());
}
void EnqueueVisitor::VisitObjCEncodeExpr(ObjCEncodeExpr *E) {
AddTypeLoc(E->getEncodedTypeSourceInfo());
OpenPOWER on IntegriCloud