llvm/clang/tools/libclang/CXExtractAPI.cpp

//===- CXExtractAPI.cpp - libclang APIs for manipulating CXAPISet ---------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file defines all libclang APIs related to manipulation CXAPISet
//
//===----------------------------------------------------------------------===//

#include "CXCursor.h"
#include "CXString.h"
#include "CXTranslationUnit.h"
#include "clang-c/CXErrorCode.h"
#include "clang-c/Documentation.h"
#include "clang-c/Index.h"
#include "clang-c/Platform.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclObjC.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/ExtractAPI/API.h"
#include "clang/ExtractAPI/ExtractAPIVisitor.h"
#include "clang/ExtractAPI/Serialization/SymbolGraphSerializer.h"
#include "clang/Frontend/ASTUnit.h"
#include "clang/Frontend/FrontendOptions.h"
#include "clang/Index/USRGeneration.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/CBindingWrapping.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/raw_ostream.h"

usingnamespaceclang;
usingnamespaceclang::extractapi;

namespace {
struct LibClangExtractAPIVisitor
    : ExtractAPIVisitor<LibClangExtractAPIVisitor> {};
} // namespace

DEFINE_SIMPLE_CONVERSION_FUNCTIONS()

// Visits the Decl D and it's transitive DeclContexts recursively, starting from
// the outer-most context. This is guaranteed to visit every Decl we need in the
// right order to generate symbol graph information for D.
static void WalkupFromMostDerivedType(LibClangExtractAPIVisitor &Visitor,
                                      Decl *D) {}

static CXString GenerateCXStringFromSymbolGraphData(llvm::json::Object Obj) {}

enum CXErrorCode clang_createAPISet(CXTranslationUnit tu, CXAPISet *out_api) {}

void clang_disposeAPISet(CXAPISet api) {}

CXString clang_getSymbolGraphForUSR(const char *usr, CXAPISet api) {}

CXString clang_getSymbolGraphForCursor(CXCursor cursor) {}