[libclang] Introduce clang_Range_isNull.
llvm-svn: 140706
This commit is contained in:
parent
6f37b4a5a5
commit
e7e4291448
|
@ -335,6 +335,11 @@ CINDEX_LINKAGE CXSourceRange clang_getRange(CXSourceLocation begin,
|
|||
CINDEX_LINKAGE unsigned clang_equalRanges(CXSourceRange range1,
|
||||
CXSourceRange range2);
|
||||
|
||||
/**
|
||||
* \brief Returns non-zero if \arg range is null.
|
||||
*/
|
||||
int clang_Range_isNull(CXSourceRange range);
|
||||
|
||||
/**
|
||||
* \brief Retrieve the file, line, column, and offset represented by
|
||||
* the given source location.
|
||||
|
|
|
@ -2758,6 +2758,11 @@ unsigned clang_equalRanges(CXSourceRange range1, CXSourceRange range2)
|
|||
&& range1.begin_int_data == range2.begin_int_data
|
||||
&& range1.end_int_data == range2.end_int_data;
|
||||
}
|
||||
|
||||
int clang_Range_isNull(CXSourceRange range) {
|
||||
return clang_equalRanges(range, clang_getNullRange());
|
||||
}
|
||||
|
||||
} // end: extern "C"
|
||||
|
||||
static void createNullLocation(CXFile *file, unsigned *line,
|
||||
|
|
|
@ -142,6 +142,7 @@ clang_isUnexposed
|
|||
clang_isVirtualBase
|
||||
clang_isVolatileQualifiedType
|
||||
clang_parseTranslationUnit
|
||||
clang_Range_isNull
|
||||
clang_remap_dispose
|
||||
clang_remap_getFilenames
|
||||
clang_remap_getNumFiles
|
||||
|
|
Loading…
Reference in New Issue