clang 19.0.0git
Classes | Functions
CXSourceLocation.h File Reference
#include "clang-c/CXFile.h"
#include "clang-c/CXString.h"
#include "clang-c/ExternC.h"
#include "clang-c/Platform.h"

Go to the source code of this file.

Classes

struct  CXSourceLocation
 Identifies a specific source location within a translation unit. More...
 
struct  CXSourceRange
 Identifies a half-open character range in the source code. More...
 
struct  CXSourceRangeList
 Identifies an array of ranges. More...
 

Functions

CINDEX_LINKAGE CXSourceLocation clang_getNullLocation (void)
 Retrieve a NULL (invalid) source location.
 
CINDEX_LINKAGE unsigned clang_equalLocations (CXSourceLocation loc1, CXSourceLocation loc2)
 Determine whether two source locations, which must refer into the same translation unit, refer to exactly the same point in the source code.
 
CINDEX_LINKAGE int clang_Location_isInSystemHeader (CXSourceLocation location)
 Returns non-zero if the given source location is in a system header.
 
CINDEX_LINKAGE int clang_Location_isFromMainFile (CXSourceLocation location)
 Returns non-zero if the given source location is in the main file of the corresponding translation unit.
 
CINDEX_LINKAGE CXSourceRange clang_getNullRange (void)
 Retrieve a NULL (invalid) source range.
 
CINDEX_LINKAGE CXSourceRange clang_getRange (CXSourceLocation begin, CXSourceLocation end)
 Retrieve a source range given the beginning and ending source locations.
 
CINDEX_LINKAGE unsigned clang_equalRanges (CXSourceRange range1, CXSourceRange range2)
 Determine whether two ranges are equivalent.
 
CINDEX_LINKAGE int clang_Range_isNull (CXSourceRange range)
 Returns non-zero if range is null.
 
CINDEX_LINKAGE void clang_getExpansionLocation (CXSourceLocation location, CXFile *file, unsigned *line, unsigned *column, unsigned *offset)
 Retrieve the file, line, column, and offset represented by the given source location.
 
CINDEX_LINKAGE void clang_getPresumedLocation (CXSourceLocation location, CXString *filename, unsigned *line, unsigned *column)
 Retrieve the file, line and column represented by the given source location, as specified in a # line directive.
 
CINDEX_LINKAGE void clang_getInstantiationLocation (CXSourceLocation location, CXFile *file, unsigned *line, unsigned *column, unsigned *offset)
 Legacy API to retrieve the file, line, column, and offset represented by the given source location.
 
CINDEX_LINKAGE void clang_getSpellingLocation (CXSourceLocation location, CXFile *file, unsigned *line, unsigned *column, unsigned *offset)
 Retrieve the file, line, column, and offset represented by the given source location.
 
CINDEX_LINKAGE void clang_getFileLocation (CXSourceLocation location, CXFile *file, unsigned *line, unsigned *column, unsigned *offset)
 Retrieve the file, line, column, and offset represented by the given source location.
 
CINDEX_LINKAGE CXSourceLocation clang_getRangeStart (CXSourceRange range)
 Retrieve a source location representing the first character within a source range.
 
CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd (CXSourceRange range)
 Retrieve a source location representing the last character within a source range.
 
CINDEX_LINKAGE void clang_disposeSourceRangeList (CXSourceRangeList *ranges)
 Destroy the given CXSourceRangeList.