summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/IndexBody.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-08 01:21:13 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-08 01:21:13 +0000
commita2a299e586bf3143480e1a75fbe20235d5fa33ff (patch)
tree72d68885a853be9cce40546864b889e8dc1799c8 /clang/tools/libclang/IndexBody.cpp
parent34ddc8db22b0faef3050fe41e502d1fea6bee062 (diff)
downloadbcm5719-llvm-a2a299e586bf3143480e1a75fbe20235d5fa33ff.tar.gz
bcm5719-llvm-a2a299e586bf3143480e1a75fbe20235d5fa33ff.zip
[libclang] For CXXOperatorCallExprs, give a valid source location to the DeclRefExpr
that is referencing the member function, so we can index the referenced function. Fixes rdar://10762375&10324915 & http://llvm.org/PR11192 llvm-svn: 150033
Diffstat (limited to 'clang/tools/libclang/IndexBody.cpp')
-rw-r--r--clang/tools/libclang/IndexBody.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/tools/libclang/IndexBody.cpp b/clang/tools/libclang/IndexBody.cpp
index 08c7d18f690..c4004911328 100644
--- a/clang/tools/libclang/IndexBody.cpp
+++ b/clang/tools/libclang/IndexBody.cpp
@@ -90,6 +90,12 @@ public:
return true;
}
+ bool TraverseCXXOperatorCallExpr(CXXOperatorCallExpr *E) {
+ if (E->getOperatorLoc().isInvalid())
+ return true; // implicit.
+ return base::TraverseCXXOperatorCallExpr(E);
+ }
+
bool VisitDeclStmt(DeclStmt *S) {
if (IndexCtx.indexFunctionLocalSymbols())
IndexCtx.indexDeclGroupRef(S->getDeclGroup());
OpenPOWER on IntegriCloud