diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/clang-c/Index.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h index 94c896ec6e..011588efc8 100644 --- a/include/clang-c/Index.h +++ b/include/clang-c/Index.h @@ -32,7 +32,7 @@ * compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable. */ #define CINDEX_VERSION_MAJOR 0 -#define CINDEX_VERSION_MINOR 9 +#define CINDEX_VERSION_MINOR 10 #define CINDEX_VERSION_ENCODE(major, minor) ( \ ((major) * 10000) \ @@ -531,6 +531,35 @@ CINDEX_LINKAGE void clang_getSpellingLocation(CXSourceLocation location, unsigned *offset); /** + * \brief Retrieve the file, line, column, and offset represented by + * the given source location. + * + * If the location refers into a macro expansion, return where the macro was + * expanded or where the macro argument was written, if the location points at + * a macro argument. + * + * \param location the location within a source file that will be decomposed + * into its parts. + * + * \param file [out] if non-NULL, will be set to the file to which the given + * source location points. + * + * \param line [out] if non-NULL, will be set to the line to which the given + * source location points. + * + * \param column [out] if non-NULL, will be set to the column to which the given + * source location points. + * + * \param offset [out] if non-NULL, will be set to the offset into the + * buffer to which the given source location points. + */ +CINDEX_LINKAGE void clang_getFileLocation(CXSourceLocation location, + CXFile *file, + unsigned *line, + unsigned *column, + unsigned *offset); + +/** * \brief Retrieve a source location representing the first character within a * source range. */ |