[cfe-commits] r140706 - in /cfe/trunk: include/clang-c/Index.h tools/libclang/CIndex.cpp tools/libclang/libclang.exports
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Sep 28 11:14:21 PDT 2011
Author: akirtzidis
Date: Wed Sep 28 13:14:21 2011
New Revision: 140706
URL: http://llvm.org/viewvc/llvm-project?rev=140706&view=rev
Log:
[libclang] Introduce clang_Range_isNull.
Modified:
cfe/trunk/include/clang-c/Index.h
cfe/trunk/tools/libclang/CIndex.cpp
cfe/trunk/tools/libclang/libclang.exports
Modified: cfe/trunk/include/clang-c/Index.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang-c/Index.h?rev=140706&r1=140705&r2=140706&view=diff
==============================================================================
--- cfe/trunk/include/clang-c/Index.h (original)
+++ cfe/trunk/include/clang-c/Index.h Wed Sep 28 13:14:21 2011
@@ -336,6 +336,11 @@
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.
*
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=140706&r1=140705&r2=140706&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Wed Sep 28 13:14:21 2011
@@ -2758,6 +2758,11 @@
&& 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,
Modified: cfe/trunk/tools/libclang/libclang.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/libclang.exports?rev=140706&r1=140705&r2=140706&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/libclang.exports (original)
+++ cfe/trunk/tools/libclang/libclang.exports Wed Sep 28 13:14:21 2011
@@ -142,6 +142,7 @@
clang_isVirtualBase
clang_isVolatileQualifiedType
clang_parseTranslationUnit
+clang_Range_isNull
clang_remap_dispose
clang_remap_getFilenames
clang_remap_getNumFiles
More information about the cfe-commits
mailing list