blob: d28438770e7d3497500bd3ef37c7e6a664447a32 [file] [log] [blame]
//===- CXString.h - Routines for manipulating CXStrings -------------------===//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// This file defines routines for manipulating CXStrings.
#include "clang-c/Index.h"
#ifndef __has_feature
#define __has_feature(x) 0
#if __has_feature(blocks)
#define INVOKE_BLOCK2(block, arg1, arg2) block(arg1, arg2)
// If we are compiled with a compiler that doesn't have native blocks support,
// define and call the block manually.
#define INVOKE_BLOCK2(block, arg1, arg2) block->invoke(block, arg1, arg2)
typedef struct _CXCursorAndRangeVisitorBlock {
void *isa;
int flags;
int reserved;
enum CXVisitorResult (*invoke)(_CXCursorAndRangeVisitorBlock *,
CXCursor, CXSourceRange);
} *CXCursorAndRangeVisitorBlock;
#endif // !__has_feature(blocks)
/// The result of comparing two source ranges.
enum RangeComparisonResult {
/// Either the ranges overlap or one of the ranges is invalid.
/// The first range ends before the second range starts.
/// The first range starts after the second range ends.