aboutsummaryrefslogtreecommitdiff
path: root/include/clang-c/Index.h
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2010-10-15 17:07:39 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2010-10-15 17:07:39 +0000
commit83889a7f1f338e343ef72aeeef9c27f7b62c0f0f (patch)
treeaa09afe34003ec073f32270324889535fbd28e77 /include/clang-c/Index.h
parent6eaac8b3e68177f56090ddb0fcfc8fbfd49150a6 (diff)
Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116587 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c/Index.h')
-rw-r--r--include/clang-c/Index.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index bf995682c6..40d3bafaff 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -301,6 +301,13 @@ CINDEX_LINKAGE CXSourceLocation clang_getLocation(CXTranslationUnit tu,
CXFile file,
unsigned line,
unsigned column);
+/**
+ * \brief Retrieves the source location associated with a given character offset
+ * in a particular translation unit.
+ */
+CINDEX_LINKAGE CXSourceLocation clang_getLocationForOffset(CXTranslationUnit tu,
+ CXFile file,
+ unsigned offset);
/**
* \brief Retrieve a NULL (invalid) source range.