CINDEX_LINKAGE CXSourceLocation clang_getRangeEnd(CXSourceRange range);
/**
- * \brief Identifies an array of ranges that were skipped by the preprocessor.
- *
- * The preprocessor will skip lines when they are surrounded by an
- * if/ifdef/ifndef directive whose condition does not evaluate to true.
+ * \brief Identifies an array of ranges.
*/
typedef struct {
/** \brief The number of ranges in the \c ranges array. */
unsigned count;
/**
- * \brief An array of \c CXSourceRange, where each range starts at the
- * preprocessor directive after the # token, and ends at the end of the
- * corresponding endif.
+ * \brief An array of \c CXSourceRanges.
*/
CXSourceRange *ranges;
-} CXSkippedRanges;
+} CXSourceRangeList;
/**
* \brief Retrieve all ranges that were skipped by the preprocessor.
+ *
+ * The preprocessor will skip lines when they are surrounded by an
+ * if/ifdef/ifndef directive whose condition does not evaluate to true.
*/
-CINDEX_LINKAGE CXSkippedRanges *clang_getSkippedRanges(CXTranslationUnit tu, CXFile file);
+CINDEX_LINKAGE CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit tu,
+ CXFile file);
/**
- * \brief Destroy the given \c CXSkippedRanges.
+ * \brief Destroy the given \c CXSourceRangeList.
*/
-CINDEX_LINKAGE void clang_disposeSkippedRanges(CXSkippedRanges *skipped);
+CINDEX_LINKAGE void clang_disposeSourceRangeList(CXSourceRangeList *ranges);
/**
* @}
CXSourceLocation startLoc, endLoc;
CXFile file = 0;
CXCursor *cursors = 0;
- CXSkippedRanges *skipped_ranges = 0;
+ CXSourceRangeList *skipped_ranges = 0;
unsigned i;
input += strlen("-test-annotate-tokens=");
PrintExtent(stdout, start_line, start_column, end_line, end_column);
printf("\n");
}
- clang_disposeSkippedRanges(skipped_ranges);
+ clang_disposeSourceRangeList(skipped_ranges);
for (i = 0; i != num_tokens; ++i) {
const char *kind = "<unknown>";
delete (MemUsageEntries*) usage.data;
}
-CXSkippedRanges *clang_getSkippedRanges(CXTranslationUnit TU, CXFile file) {
- CXSkippedRanges *skipped = new CXSkippedRanges;
+CXSourceRangeList *clang_getSkippedRanges(CXTranslationUnit TU, CXFile file) {
+ CXSourceRangeList *skipped = new CXSourceRangeList;
skipped->count = 0;
skipped->ranges = 0;
return skipped;
}
-void clang_disposeSkippedRanges(CXSkippedRanges *skipped) {
- if (skipped) {
- delete[] skipped->ranges;
- delete skipped;
+void clang_disposeSourceRangeList(CXSourceRangeList *ranges) {
+ if (ranges) {
+ delete[] ranges->ranges;
+ delete ranges;
}
}
clang_disposeIndex
clang_disposeOverriddenCursors
clang_disposeCXPlatformAvailability
-clang_disposeSkippedRanges
+clang_disposeSourceRangeList
clang_disposeString
clang_disposeTokens
clang_disposeTranslationUnit