1 //===- CXString.h - Routines for manipulating CXStrings -------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines routines for manipulating CXStrings.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_TOOLS_LIBCLANG_INDEX_INTERNAL_H
15 #define LLVM_CLANG_TOOLS_LIBCLANG_INDEX_INTERNAL_H
17 #include "clang-c/Index.h"
20 #define __has_feature(x) 0
23 #if __has_feature(blocks)
25 #define INVOKE_BLOCK2(block, arg1, arg2) block(arg1, arg2)
28 // If we are compiled with a compiler that doesn't have native blocks support,
29 // define and call the block manually.
31 #define INVOKE_BLOCK2(block, arg1, arg2) block->invoke(block, arg1, arg2)
33 typedef struct _CXCursorAndRangeVisitorBlock {
37 enum CXVisitorResult (*invoke)(_CXCursorAndRangeVisitorBlock *,
38 CXCursor, CXSourceRange);
39 } *CXCursorAndRangeVisitorBlock;
41 #endif // !__has_feature(blocks)
43 /// The result of comparing two source ranges.
44 enum RangeComparisonResult {
45 /// Either the ranges overlap or one of the ranges is invalid.
48 /// The first range ends before the second range starts.
51 /// The first range starts after the second range ends.