[libclang] Introduce cxcursor::getCursorParentDecl(CXCursor Cursor) and use it at the appropriate place in CIndex.cpp
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134104 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 3f9d34f..ec78caa 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -4658,7 +4658,7 @@
// MyCXXClass foo; // Make sure we don't annotate 'foo' as a CallExpr cursor.
if (clang_isExpression(cursorK)) {
Expr *E = getCursorExpr(cursor);
- if (Decl *D = getCursorDecl(cursor)) {
+ if (Decl *D = getCursorParentDecl(cursor)) {
const unsigned I = NextToken();
if (E->getLocStart().isValid() && D->getLocation().isValid() &&
E->getLocStart() == D->getLocation() &&