ΒΆvoid clang_getPresumedLocation(
CXSourceLocation location,
CXString* filename,
unsigned int* line,
unsigned int* column)
void clang_getPresumedLocation(
CXSourceLocation location,
CXString* filename,
unsigned int* line,
unsigned int* column)
Description
Retrieve the file, line and column represented by the given source location, as specified in a # line directive. Example: given the following source code in a file somefile.c the location information returned by this function would be File: dummy.c Line: 124 Column: 12 whereas clang_getExpansionLocation would have returned File: somefile.c Line: 3 Column: 12
Declared at: clang/include/clang-c/Index.h:607
Parameters
- CXSourceLocation location
- the location within a source file that will be decomposed into its parts.
- CXString* filename
- [out] if non-NULL, will be set to the filename of the source location. Note that filenames returned will be for "virtual" files, which don't necessarily exist on the machine running clang - e.g. when parsing preprocessed output obtained from a different environment. If a non-NULL value is passed in, remember to dispose of the returned value using \c clang_disposeString() once you've finished with it. For an invalid source location, an empty string is returned.
- unsigned int* line
- [out] if non-NULL, will be set to the line number of the source location. For an invalid source location, zero is returned.
- unsigned int* column
- [out] if non-NULL, will be set to the column number of the source location. For an invalid source location, zero is returned.