summaryrefslogtreecommitdiffstats
path: root/tools
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
commit46e75477bd24a703da11d354587c9bea69d6888f (patch)
tree1d675c793969bcd6117dd0dee739a265f55a21dc /tools
parent82848c26c896d46c0b98e1776a7781e754a8ee25 (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/libclang/IndexBody.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/libclang/IndexBody.cpp b/tools/libclang/IndexBody.cpp
index 08c7d18f69..c400491132 100644
--- a/tools/libclang/IndexBody.cpp
+++ b/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());