summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
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
commit2e16ac52e1e340044be9af179521ef5b4d4506ed (patch)
treea56aec39d131a4e85303ce4e45e500c1c04d7c6a /clang/include/clang-c
parent26c5578d849a5f9cdc3044ae67e2857bbe038215 (diff)
downloadbcm5719-llvm-2e16ac52e1e340044be9af179521ef5b4d4506ed.tar.gz
bcm5719-llvm-2e16ac52e1e340044be9af179521ef5b4d4506ed.zip
Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.
llvm-svn: 116587
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r--clang/include/clang-c/Index.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index bf995682c63..40d3bafaff3 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/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.
OpenPOWER on IntegriCloud