llvm/clang/tools/libclang/CXIndexDataConsumer.cpp

//===- CXIndexDataConsumer.cpp - Index data consumer for libclang----------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "CXIndexDataConsumer.h"
#include "CIndexDiagnostic.h"
#include "CXFile.h"
#include "CXTranslationUnit.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/DeclVisitor.h"
#include "clang/Frontend/ASTUnit.h"

usingnamespaceclang;
usingnamespaceclang::index;
usingnamespacecxindex;
usingnamespacecxcursor;

namespace {
class IndexingDeclVisitor : public ConstDeclVisitor<IndexingDeclVisitor, bool> {};

CXSymbolRole getSymbolRole(SymbolRoleSet Role) {}
}

bool CXIndexDataConsumer::handleDeclOccurrence(
    const Decl *D, SymbolRoleSet Roles, ArrayRef<SymbolRelation> Relations,
    SourceLocation Loc, ASTNodeInfo ASTNode) {}

bool CXIndexDataConsumer::handleModuleOccurrence(const ImportDecl *ImportD,
                                                 const Module *Mod,
                                                 SymbolRoleSet Roles,
                                                 SourceLocation Loc) {}

void CXIndexDataConsumer::finish() {}


CXIndexDataConsumer::ObjCProtocolListInfo::ObjCProtocolListInfo(
                                    const ObjCProtocolList &ProtList,
                                    CXIndexDataConsumer &IdxCtx,
                                    ScratchAlloc &SA) {}


IBOutletCollectionInfo::IBOutletCollectionInfo(
                                          const IBOutletCollectionInfo &other)
  :{}

AttrListInfo::AttrListInfo(const Decl *D, CXIndexDataConsumer &IdxCtx)
  :{}

IntrusiveRefCntPtr<AttrListInfo>
AttrListInfo::create(const Decl *D, CXIndexDataConsumer &IdxCtx) {}

CXIndexDataConsumer::CXXBasesListInfo::CXXBasesListInfo(const CXXRecordDecl *D,
                                   CXIndexDataConsumer &IdxCtx,
                                   ScratchAlloc &SA) {}

SourceLocation CXIndexDataConsumer::CXXBasesListInfo::getBaseLoc(
                                           const CXXBaseSpecifier &Base) const {}

const char *ScratchAlloc::toCStr(StringRef Str) {}

const char *ScratchAlloc::copyCStr(StringRef Str) {}

void CXIndexDataConsumer::setASTContext(ASTContext &ctx) {}

void CXIndexDataConsumer::setPreprocessor(std::shared_ptr<Preprocessor> PP) {}

bool CXIndexDataConsumer::isFunctionLocalDecl(const Decl *D) {}

bool CXIndexDataConsumer::shouldAbort() {}

void CXIndexDataConsumer::enteredMainFile(OptionalFileEntryRef File) {}

void CXIndexDataConsumer::ppIncludedFile(SourceLocation hashLoc,
                                         StringRef filename,
                                         OptionalFileEntryRef File,
                                         bool isImport, bool isAngled,
                                         bool isModuleImport) {}

void CXIndexDataConsumer::importedModule(const ImportDecl *ImportD) {}

void CXIndexDataConsumer::importedPCH(FileEntryRef File) {}

void CXIndexDataConsumer::startedTranslationUnit() {}

void CXIndexDataConsumer::indexDiagnostics() {}

void CXIndexDataConsumer::handleDiagnosticSet(CXDiagnostic CXDiagSet) {}

bool CXIndexDataConsumer::handleDecl(const NamedDecl *D,
                                 SourceLocation Loc, CXCursor Cursor,
                                 DeclInfo &DInfo,
                                 const DeclContext *LexicalDC,
                                 const DeclContext *SemaDC) {}

bool CXIndexDataConsumer::handleObjCContainer(const ObjCContainerDecl *D,
                                          SourceLocation Loc, CXCursor Cursor,
                                          ObjCContainerDeclInfo &ContDInfo) {}

bool CXIndexDataConsumer::handleFunction(const FunctionDecl *D) {}

bool CXIndexDataConsumer::handleVar(const VarDecl *D) {}

bool CXIndexDataConsumer::handleField(const FieldDecl *D) {}

bool CXIndexDataConsumer::handleEnumerator(const EnumConstantDecl *D) {}

bool CXIndexDataConsumer::handleTagDecl(const TagDecl *D) {}

bool CXIndexDataConsumer::handleTypedefName(const TypedefNameDecl *D) {}

bool CXIndexDataConsumer::handleObjCInterface(const ObjCInterfaceDecl *D) {}

bool CXIndexDataConsumer::handleObjCImplementation(
                                              const ObjCImplementationDecl *D) {}

bool CXIndexDataConsumer::handleObjCProtocol(const ObjCProtocolDecl *D) {}

bool CXIndexDataConsumer::handleObjCCategory(const ObjCCategoryDecl *D) {}

bool CXIndexDataConsumer::handleObjCCategoryImpl(const ObjCCategoryImplDecl *D) {}

bool CXIndexDataConsumer::handleObjCMethod(const ObjCMethodDecl *D,
                                           SourceLocation Loc) {}

bool CXIndexDataConsumer::handleSynthesizedObjCProperty(
                                                const ObjCPropertyImplDecl *D) {}

bool CXIndexDataConsumer::handleSynthesizedObjCMethod(const ObjCMethodDecl *D,
                                                  SourceLocation Loc,
                                                 const DeclContext *LexicalDC) {}

bool CXIndexDataConsumer::handleObjCProperty(const ObjCPropertyDecl *D) {}

bool CXIndexDataConsumer::handleNamespace(const NamespaceDecl *D) {}

bool CXIndexDataConsumer::handleClassTemplate(const ClassTemplateDecl *D) {}

bool CXIndexDataConsumer::handleFunctionTemplate(const FunctionTemplateDecl *D) {}

bool CXIndexDataConsumer::handleTypeAliasTemplate(const TypeAliasTemplateDecl *D) {}

bool CXIndexDataConsumer::handleConcept(const ConceptDecl *D) {}

bool CXIndexDataConsumer::handleReference(const NamedDecl *D, SourceLocation Loc,
                                      CXCursor Cursor,
                                      const NamedDecl *Parent,
                                      const DeclContext *DC,
                                      const Expr *E,
                                      CXIdxEntityRefKind Kind,
                                      CXSymbolRole Role) {}

bool CXIndexDataConsumer::isNotFromSourceFile(SourceLocation Loc) const {}

void CXIndexDataConsumer::addContainerInMap(const DeclContext *DC,
                                        CXIdxClientContainer container) {}

CXIdxClientEntity CXIndexDataConsumer::getClientEntity(const Decl *D) const {}

void CXIndexDataConsumer::setClientEntity(const Decl *D, CXIdxClientEntity client) {}

bool CXIndexDataConsumer::handleCXXRecordDecl(const CXXRecordDecl *RD,
                                          const NamedDecl *OrigD) {}

bool CXIndexDataConsumer::markEntityOccurrenceInFile(const NamedDecl *D,
                                                 SourceLocation Loc) {}

const NamedDecl *CXIndexDataConsumer::getEntityDecl(const NamedDecl *D) const {}

const DeclContext *
CXIndexDataConsumer::getEntityContainer(const Decl *D) const {}

CXIdxClientContainer
CXIndexDataConsumer::getClientContainerForDC(const DeclContext *DC) const {}

CXIdxClientFile CXIndexDataConsumer::getIndexFile(OptionalFileEntryRef File) {}

CXIdxLoc CXIndexDataConsumer::getIndexLoc(SourceLocation Loc) const {}

void CXIndexDataConsumer::translateLoc(SourceLocation Loc,
                                   CXIdxClientFile *indexFile, CXFile *file,
                                   unsigned *line, unsigned *column,
                                   unsigned *offset) {}

static CXIdxEntityKind getEntityKindFromSymbolKind(SymbolKind K, SymbolLanguage L);
static CXIdxEntityCXXTemplateKind
getEntityKindFromSymbolProperties(SymbolPropertySet K);
static CXIdxEntityLanguage getEntityLangFromSymbolLang(SymbolLanguage L);

void CXIndexDataConsumer::getEntityInfo(const NamedDecl *D,
                                    EntityInfo &EntityInfo,
                                    ScratchAlloc &SA) {}

void CXIndexDataConsumer::getContainerInfo(const DeclContext *DC,
                                       ContainerInfo &ContInfo) {}

CXCursor CXIndexDataConsumer::getRefCursor(const NamedDecl *D, SourceLocation Loc) {}

bool CXIndexDataConsumer::shouldIgnoreIfImplicit(const Decl *D) {}

bool CXIndexDataConsumer::isTemplateImplicitInstantiation(const Decl *D) {}

static CXIdxEntityKind getEntityKindFromSymbolKind(SymbolKind K, SymbolLanguage Lang) {}

static CXIdxEntityCXXTemplateKind
getEntityKindFromSymbolProperties(SymbolPropertySet K) {}

static CXIdxEntityLanguage getEntityLangFromSymbolLang(SymbolLanguage L) {}