#include "CXSourceLocation.h"
#include "CIndexer.h"
#include "CLog.h"
#include "CXFile.h"
#include "CXLoadedDiagnostic.h"
#include "CXString.h"
#include "CXTranslationUnit.h"
#include "clang/Basic/FileManager.h"
#include "clang/Frontend/ASTUnit.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Format.h"
usingnamespaceclang;
usingnamespaceclang::cxindex;
static bool isASTUnitSourceLocation(const CXSourceLocation &L) { … }
CXSourceLocation clang_getNullLocation() { … }
unsigned clang_equalLocations(CXSourceLocation loc1, CXSourceLocation loc2) { … }
unsigned clang_isBeforeInTranslationUnit(CXSourceLocation loc1,
CXSourceLocation loc2) { … }
CXSourceRange clang_getNullRange() { … }
CXSourceRange clang_getRange(CXSourceLocation begin, CXSourceLocation end) { … }
unsigned clang_equalRanges(CXSourceRange range1, CXSourceRange range2) { … }
int clang_Range_isNull(CXSourceRange range) { … }
CXSourceLocation clang_getRangeStart(CXSourceRange range) { … }
CXSourceLocation clang_getRangeEnd(CXSourceRange range) { … }
CXSourceLocation clang_getLocation(CXTranslationUnit TU,
CXFile file,
unsigned line,
unsigned column) { … }
CXSourceLocation clang_getLocationForOffset(CXTranslationUnit TU,
CXFile file,
unsigned offset) { … }
static void createNullLocation(CXFile *file, unsigned *line,
unsigned *column, unsigned *offset) { … }
static void createNullLocation(CXString *filename, unsigned *line,
unsigned *column, unsigned *offset = nullptr) { … }
int clang_Location_isInSystemHeader(CXSourceLocation location) { … }
int clang_Location_isFromMainFile(CXSourceLocation location) { … }
void clang_getExpansionLocation(CXSourceLocation location,
CXFile *file,
unsigned *line,
unsigned *column,
unsigned *offset) { … }
void clang_getPresumedLocation(CXSourceLocation location,
CXString *filename,
unsigned *line,
unsigned *column) { … }
void clang_getInstantiationLocation(CXSourceLocation location,
CXFile *file,
unsigned *line,
unsigned *column,
unsigned *offset) { … }
void clang_getSpellingLocation(CXSourceLocation location,
CXFile *file,
unsigned *line,
unsigned *column,
unsigned *offset) { … }
void clang_getFileLocation(CXSourceLocation location,
CXFile *file,
unsigned *line,
unsigned *column,
unsigned *offset) { … }