diff options
| author | Fangrui Song <maskray@google.com> | 2018-11-20 08:00:00 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2018-11-20 08:00:00 +0000 |
| commit | cabb36d38d9e71610c7767a22477576aa8a4d9fa (patch) | |
| tree | 83a7fb26d29d77f774c462ca2b73b444c2317795 /clang/tools/libclang/CIndex.cpp | |
| parent | c733c7bf94f8eecbe8de9e36d0c8f0c078530cba (diff) | |
| download | bcm5719-llvm-cabb36d38d9e71610c7767a22477576aa8a4d9fa.tar.gz bcm5719-llvm-cabb36d38d9e71610c7767a22477576aa8a4d9fa.zip | |
[libclang] Unify getCursorDecl and getCursorParentDecl
They do the same thing, thus the latter (which has only 2 call sites) can be deleted.
llvm-svn: 347293
Diffstat (limited to 'clang/tools/libclang/CIndex.cpp')
| -rw-r--r-- | clang/tools/libclang/CIndex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp index eb3c9c34cdb..e9bc3939719 100644 --- a/clang/tools/libclang/CIndex.cpp +++ b/clang/tools/libclang/CIndex.cpp @@ -6940,7 +6940,7 @@ AnnotateTokensWorker::DetermineChildActions(CXCursor Cursor) const { if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(Callee)) { const Expr *SubExpr = ICE->getSubExpr(); if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(SubExpr)) { - const Decl *parentDecl = getCursorParentDecl(Cursor); + const Decl *parentDecl = getCursorDecl(Cursor); CXTranslationUnit TU = clang_Cursor_getTranslationUnit(Cursor); // Visit the DeclRefExpr as last. @@ -7163,7 +7163,7 @@ AnnotateTokensWorker::Visit(CXCursor cursor, CXCursor parent) { // MyCXXClass foo; // Make sure we don't annotate 'foo' as a CallExpr cursor. if (clang_isExpression(cursorK) && MoreTokens()) { const Expr *E = getCursorExpr(cursor); - if (const Decl *D = getCursorParentDecl(cursor)) { + if (const Decl *D = getCursorDecl(cursor)) { const unsigned I = NextToken(); if (E->getBeginLoc().isValid() && D->getLocation().isValid() && E->getBeginLoc() == D->getLocation() && |

