diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-12-21 07:55:45 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-12-21 07:55:45 +0000 |
| commit | 7ecd19ecded872b97e3fcc839ba9d3516d153d8e (patch) | |
| tree | c4670920e92c1422f635a35db93080ec08e55465 /clang/include/clang-c | |
| parent | 7c84229db6d0fa6fc1a150b26d1efe029aabef85 (diff) | |
| download | bcm5719-llvm-7ecd19ecded872b97e3fcc839ba9d3516d153d8e.tar.gz bcm5719-llvm-7ecd19ecded872b97e3fcc839ba9d3516d153d8e.zip | |
Teach clang_getCursorSemanticParent() and
clang_getCursorLexicalParent() to cope with class and function
templates, along with the parent of the translation unit. Fixes PR8761
and PR8766.
llvm-svn: 122324
Diffstat (limited to 'clang/include/clang-c')
| -rw-r--r-- | clang/include/clang-c/Index.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 0be4d4a02c1..9bf492d5f80 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -1522,6 +1522,8 @@ CINDEX_LINKAGE unsigned clang_CXCursorSet_insert(CXCursorSet cset, * In the example above, both declarations of \c C::f have \c C as their * semantic context, while the lexical context of the first \c C::f is \c C * and the lexical context of the second \c C::f is the translation unit. + * + * For global declarations, the semantic parent is the translation unit. */ CINDEX_LINKAGE CXCursor clang_getCursorSemanticParent(CXCursor cursor); @@ -1555,6 +1557,9 @@ CINDEX_LINKAGE CXCursor clang_getCursorSemanticParent(CXCursor cursor); * In the example above, both declarations of \c C::f have \c C as their * semantic context, while the lexical context of the first \c C::f is \c C * and the lexical context of the second \c C::f is the translation unit. + * + * For declarations written in the global scope, the lexical parent is + * the translation unit. */ CINDEX_LINKAGE CXCursor clang_getCursorLexicalParent(CXCursor cursor); |

