diff options
Diffstat (limited to 'clang/include/clang-c/Index.h')
| -rw-r--r-- | clang/include/clang-c/Index.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 644b2e29412..44cbe0efff8 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -251,13 +251,24 @@ const char *clang_getDeclSource(CXDecl); /** Usage: clang_getCursor() will translate a source/line/column position into an AST cursor (to derive semantic information from the source code). - If 'RelativeToDecl' is NULL, the entire translation unit will be searched. - Note that searching the entire translation unit can be slow. - Otherwise, the "search" for the AST cursor will start at 'RelativeToDecl'. */ CXCursor clang_getCursor(CXTranslationUnit, const char *source_name, - unsigned line, unsigned column, - CXDecl RelativeToDecl); + unsigned line, unsigned column); + +/** + Usage: clang_getCursorWithHint() provides the same functionality as + clang_getCursor() except that it takes an option 'hint' argument. + The 'hint' is a temporary CXLookupHint object (whose lifetime is managed by + the caller) that should be initialized with clang_initCXLookupHint(). + + FIXME: Add a better comment once getCursorWithHint() has more functionality. + */ +typedef CXCursor CXLookupHint; +CXCursor clang_getCursorWithHint(CXTranslationUnit, const char *source_name, + unsigned line, unsigned column, + CXLookupHint *hint); + +void clang_initCXLookupHint(CXLookupHint *hint); enum CXCursorKind clang_getCursorKind(CXCursor); unsigned clang_isDeclaration(enum CXCursorKind); |

