diff options
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index b458216f70d..5cbc2fae53f 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -60,9 +60,13 @@ static void TranslationUnitVisitor(CXTranslationUnit Unit, CXCursor Cursor, curColumn = 1; } else if (*startBuf != '\t') curColumn++; + + CXLookupHint hint; + clang_initCXLookupHint(&hint); + hint.decl = Cursor.decl; - Ref = clang_getCursor(Unit, clang_getCursorSource(Cursor), - curLine, curColumn, Cursor.decl); + Ref = clang_getCursorWithHint(Unit, clang_getCursorSource(Cursor), + curLine, curColumn, &hint); if (Ref.kind == CXCursor_NoDeclFound) { /* Nothing found here; that's fine. */ } else if (Ref.kind != CXCursor_FunctionDecl) { |