aboutsummaryrefslogtreecommitdiff
path: root/include/clang-c
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-08 20:42:33 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-03-08 20:42:33 +0000
commit389dc5603fa10b508a38f668a7830c6d877b6542 (patch)
tree380474ef5675df91a70d2bd81ec549505eefd83a /include/clang-c
parentaa62d0c4fc9449d4c438fe200ef329b067c037c7 (diff)
[libclang] Modify clang_findReferencesInFile and clang_findIncludesInFile to return a value.
Possible values are: 1 : if a parameter was invalid -1 : if the callback returned CXVisit_Break, otherwise returns 0. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176716 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang-c')
-rw-r--r--include/clang-c/Index.h28
1 files changed, 19 insertions, 9 deletions
diff --git a/include/clang-c/Index.h b/include/clang-c/Index.h
index b9b4f8e269..df7fa40664 100644
--- a/include/clang-c/Index.h
+++ b/include/clang-c/Index.h
@@ -32,7 +32,7 @@
* compatible, thus CINDEX_VERSION_MAJOR is expected to remain stable.
*/
#define CINDEX_VERSION_MAJOR 0
-#define CINDEX_VERSION_MINOR 13
+#define CINDEX_VERSION_MINOR 14
#define CINDEX_VERSION_ENCODE(major, minor) ( \
((major) * 10000) \
@@ -5017,9 +5017,14 @@ typedef struct {
* each reference found.
* The CXSourceRange will point inside the file; if the reference is inside
* a macro (and not a macro argument) the CXSourceRange will be invalid.
+ *
+ * \returns
+ * 1 : if a parameter was invalid
+ * -1 : if the callback returned CXVisit_Break,
+ * otherwise returns 0.
*/
-CINDEX_LINKAGE void clang_findReferencesInFile(CXCursor cursor, CXFile file,
- CXCursorAndRangeVisitor visitor);
+CINDEX_LINKAGE int clang_findReferencesInFile(CXCursor cursor, CXFile file,
+ CXCursorAndRangeVisitor visitor);
/**
* \brief Find #import/#include directives in a specific file.
@@ -5030,9 +5035,14 @@ CINDEX_LINKAGE void clang_findReferencesInFile(CXCursor cursor, CXFile file,
*
* \param visitor callback that will receive pairs of CXCursor/CXSourceRange for
* each directive found.
+ *
+ * \returns
+ * 1 : if a parameter was invalid
+ * -1 : if the callback returned CXVisit_Break,
+ * otherwise returns 0.
*/
-CINDEX_LINKAGE void clang_findIncludesInFile(CXTranslationUnit TU, CXFile file,
- CXCursorAndRangeVisitor visitor);
+CINDEX_LINKAGE int clang_findIncludesInFile(CXTranslationUnit TU, CXFile file,
+ CXCursorAndRangeVisitor visitor);
#ifdef __has_feature
# if __has_feature(blocks)
@@ -5041,12 +5051,12 @@ typedef enum CXVisitorResult
(^CXCursorAndRangeVisitorBlock)(CXCursor, CXSourceRange);
CINDEX_LINKAGE
-void clang_findReferencesInFileWithBlock(CXCursor, CXFile,
- CXCursorAndRangeVisitorBlock);
+int clang_findReferencesInFileWithBlock(CXCursor, CXFile,
+ CXCursorAndRangeVisitorBlock);
CINDEX_LINKAGE
-void clang_findIncludesInFileWithBlock(CXTranslationUnit, CXFile,
- CXCursorAndRangeVisitorBlock);
+int clang_findIncludesInFileWithBlock(CXTranslationUnit, CXFile,
+ CXCursorAndRangeVisitorBlock);
# endif
#endif