]> granicus.if.org Git - clang/commitdiff
[libclang] Rename CXSkippedRanges to CXSourceRangeList to make it more future-proof.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 6 Dec 2013 18:55:45 +0000 (18:55 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 6 Dec 2013 18:55:45 +0000 (18:55 +0000)
Suggested by Alp Toker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196591 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang-c/Index.h
tools/c-index-test/c-index-test.c
tools/libclang/CIndex.cpp
tools/libclang/libclang.exports

index 3ca92d83dce2d146df1852ed90572e68bd6bb71f..04c3a652bd10060c76d30c43b3a86bdbcd8ff70a 100644 (file)
@@ -599,31 +599,30 @@ CINDEX_LINKAGE CXSourceLocation clang_getRangeStart(CXSourceRange range);
 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);
 
 /**
  * @}
index 39cdcc149eea10235274b352d15966dbdfdb3685..9288f92d17ddc2f9739cb2da76a99340a4515f4c 100644 (file)
@@ -3183,7 +3183,7 @@ int perform_token_annotation(int argc, const char **argv) {
   CXSourceLocation startLoc, endLoc;
   CXFile file = 0;
   CXCursor *cursors = 0;
-  CXSkippedRanges *skipped_ranges = 0;
+  CXSourceRangeList *skipped_ranges = 0;
   unsigned i;
 
   input += strlen("-test-annotate-tokens=");
@@ -3283,7 +3283,7 @@ int perform_token_annotation(int argc, const char **argv) {
     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>";
index c8bff73935643a4843ef06867f7b37895ae262b0..e7da9620dcf2f8b0c044990be22e929c24d508a6 100644 (file)
@@ -6494,8 +6494,8 @@ void clang_disposeCXTUResourceUsage(CXTUResourceUsage usage) {
     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;
 
@@ -6528,10 +6528,10 @@ CXSkippedRanges *clang_getSkippedRanges(CXTranslationUnit TU, CXFile file) {
   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;
   }
 }
 
index 896228ad3c5ba8bd5b67ba1e6a06e13492d41c12..809cf03a10b44cdf947af1af6e3add5f4dfd4541 100644 (file)
@@ -101,7 +101,7 @@ clang_disposeDiagnosticSet
 clang_disposeIndex
 clang_disposeOverriddenCursors
 clang_disposeCXPlatformAvailability
-clang_disposeSkippedRanges
+clang_disposeSourceRangeList
 clang_disposeString
 clang_disposeTokens
 clang_disposeTranslationUnit