Add clang_getLocationForOffset() to libclang, for gives a source location from a character index into a file.
llvm-svn: 116587
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index bf99568..40d3baf 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -301,6 +301,13 @@
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.