diff options
author | Steve Naroff <snaroff@apple.com> | 2009-10-28 20:44:47 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-10-28 20:44:47 +0000 |
commit | 58bd62d190fdb27d0324c4518335a3ea461f450f (patch) | |
tree | dc7d2e935bd5259876459cb6184d04a79d4eb270 /clang/tools/c-index-test/c-index-test.c | |
parent | 476e2dfe19055bfc983114d8c143ac61c8042346 (diff) | |
download | bcm5719-llvm-58bd62d190fdb27d0324c4518335a3ea461f450f.tar.gz bcm5719-llvm-58bd62d190fdb27d0324c4518335a3ea461f450f.zip |
Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/7310688>.
Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.
I wanted to land the major changes before finishing up the optimizations.
llvm-svn: 85425
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, 2 insertions, 6 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 56b29ac136f..8791ee20a58 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -70,7 +70,6 @@ static void TranslationUnitVisitor(CXTranslationUnit Unit, CXCursor Cursor, CXCursor Ref; while (startBuf < endBuf) { - CXLookupHint hint; if (*startBuf == '\n') { startBuf++; curLine++; @@ -78,11 +77,8 @@ static void TranslationUnitVisitor(CXTranslationUnit Unit, CXCursor Cursor, } else if (*startBuf != '\t') curColumn++; - clang_initCXLookupHint(&hint); - hint.decl = Cursor.decl; - - Ref = clang_getCursorWithHint(Unit, clang_getCursorSource(Cursor), - curLine, curColumn, &hint); + Ref = clang_getCursor(Unit, clang_getCursorSource(Cursor), + curLine, curColumn); if (Ref.kind == CXCursor_NoDeclFound) { /* Nothing found here; that's fine. */ } else if (Ref.kind != CXCursor_FunctionDecl) { |