llvm/clang/lib/AST/CommentSema.cpp

//===--- CommentSema.cpp - Doxygen comment semantic analysis --------------===//
//
// 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 "clang/AST/CommentSema.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CommentCommandTraits.h"
#include "clang/AST/CommentDiagnostic.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/Basic/LLVM.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSwitch.h"

namespace clang {
namespace comments {

namespace {
#include "clang/AST/CommentHTMLTagsProperties.inc"
} // end anonymous namespace

Sema::Sema(llvm::BumpPtrAllocator &Allocator, const SourceManager &SourceMgr,
           DiagnosticsEngine &Diags, CommandTraits &Traits,
           const Preprocessor *PP) :{}

void Sema::setDecl(const Decl *D) {}

ParagraphComment *Sema::actOnParagraphComment(
                              ArrayRef<InlineContentComment *> Content) {}

BlockCommandComment *Sema::actOnBlockCommandStart(
                                      SourceLocation LocBegin,
                                      SourceLocation LocEnd,
                                      unsigned CommandID,
                                      CommandMarkerKind CommandMarker) {}

void Sema::actOnBlockCommandArgs(BlockCommandComment *Command,
                                 ArrayRef<BlockCommandComment::Argument> Args) {}

void Sema::actOnBlockCommandFinish(BlockCommandComment *Command,
                                   ParagraphComment *Paragraph) {}

ParamCommandComment *Sema::actOnParamCommandStart(
                                      SourceLocation LocBegin,
                                      SourceLocation LocEnd,
                                      unsigned CommandID,
                                      CommandMarkerKind CommandMarker) {}

void Sema::checkFunctionDeclVerbatimLine(const BlockCommandComment *Comment) {}

void Sema::checkContainerDeclVerbatimLine(const BlockCommandComment *Comment) {}

void Sema::checkContainerDecl(const BlockCommandComment *Comment) {}

/// Turn a string into the corresponding PassDirection or -1 if it's not
/// valid.
static ParamCommandPassDirection getParamPassDirection(StringRef Arg) {}

void Sema::actOnParamCommandDirectionArg(ParamCommandComment *Command,
                                         SourceLocation ArgLocBegin,
                                         SourceLocation ArgLocEnd,
                                         StringRef Arg) {}

void Sema::actOnParamCommandParamNameArg(ParamCommandComment *Command,
                                         SourceLocation ArgLocBegin,
                                         SourceLocation ArgLocEnd,
                                         StringRef Arg) {}

void Sema::actOnParamCommandFinish(ParamCommandComment *Command,
                                   ParagraphComment *Paragraph) {}

TParamCommandComment *Sema::actOnTParamCommandStart(
                                      SourceLocation LocBegin,
                                      SourceLocation LocEnd,
                                      unsigned CommandID,
                                      CommandMarkerKind CommandMarker) {}

void Sema::actOnTParamCommandParamNameArg(TParamCommandComment *Command,
                                          SourceLocation ArgLocBegin,
                                          SourceLocation ArgLocEnd,
                                          StringRef Arg) {}

void Sema::actOnTParamCommandFinish(TParamCommandComment *Command,
                                    ParagraphComment *Paragraph) {}

InlineCommandComment *
Sema::actOnInlineCommand(SourceLocation CommandLocBegin,
                         SourceLocation CommandLocEnd, unsigned CommandID,
                         ArrayRef<Comment::Argument> Args) {}

InlineContentComment *Sema::actOnUnknownCommand(SourceLocation LocBegin,
                                                SourceLocation LocEnd,
                                                StringRef CommandName) {}

InlineContentComment *Sema::actOnUnknownCommand(SourceLocation LocBegin,
                                                SourceLocation LocEnd,
                                                unsigned CommandID) {}

TextComment *Sema::actOnText(SourceLocation LocBegin,
                             SourceLocation LocEnd,
                             StringRef Text) {}

VerbatimBlockComment *Sema::actOnVerbatimBlockStart(SourceLocation Loc,
                                                    unsigned CommandID) {}

VerbatimBlockLineComment *Sema::actOnVerbatimBlockLine(SourceLocation Loc,
                                                       StringRef Text) {}

void Sema::actOnVerbatimBlockFinish(
                            VerbatimBlockComment *Block,
                            SourceLocation CloseNameLocBegin,
                            StringRef CloseName,
                            ArrayRef<VerbatimBlockLineComment *> Lines) {}

VerbatimLineComment *Sema::actOnVerbatimLine(SourceLocation LocBegin,
                                             unsigned CommandID,
                                             SourceLocation TextBegin,
                                             StringRef Text) {}

HTMLStartTagComment *Sema::actOnHTMLStartTagStart(SourceLocation LocBegin,
                                                  StringRef TagName) {}

void Sema::actOnHTMLStartTagFinish(
                              HTMLStartTagComment *Tag,
                              ArrayRef<HTMLStartTagComment::Attribute> Attrs,
                              SourceLocation GreaterLoc,
                              bool IsSelfClosing) {}

HTMLEndTagComment *Sema::actOnHTMLEndTag(SourceLocation LocBegin,
                                         SourceLocation LocEnd,
                                         StringRef TagName) {}

FullComment *Sema::actOnFullComment(
                              ArrayRef<BlockContentComment *> Blocks) {}

void Sema::checkBlockCommandEmptyParagraph(BlockCommandComment *Command) {}

void Sema::checkReturnsCommand(const BlockCommandComment *Command) {}

void Sema::checkBlockCommandDuplicate(const BlockCommandComment *Command) {}

void Sema::checkDeprecatedCommand(const BlockCommandComment *Command) {}

void Sema::resolveParamCommandIndexes(const FullComment *FC) {}

bool Sema::involvesFunctionType() {}

bool Sema::isFunctionDecl() {}

bool Sema::isAnyFunctionDecl() {}

bool Sema::isFunctionOrMethodVariadic() {}

bool Sema::isObjCMethodDecl() {}

bool Sema::isFunctionPointerVarDecl() {}

bool Sema::isObjCPropertyDecl() {}

bool Sema::isTemplateOrSpecialization() {}

bool Sema::isRecordLikeDecl() {}

bool Sema::isUnionDecl() {}
static bool isClassOrStructDeclImpl(const Decl *D) {}

bool Sema::isClassOrStructDecl() {}

bool Sema::isClassOrStructOrTagTypedefDecl() {}

bool Sema::isClassTemplateDecl() {}

bool Sema::isFunctionTemplateDecl() {}

bool Sema::isObjCInterfaceDecl() {}

bool Sema::isObjCProtocolDecl() {}

ArrayRef<const ParmVarDecl *> Sema::getParamVars() {}

void Sema::inspectThisDecl() {}

unsigned Sema::resolveParmVarReference(StringRef Name,
                                       ArrayRef<const ParmVarDecl *> ParamVars) {}

namespace {
class SimpleTypoCorrector {};

void SimpleTypoCorrector::addDecl(const NamedDecl *ND) {}
} // end anonymous namespace

unsigned Sema::correctTypoInParmVarReference(
                                    StringRef Typo,
                                    ArrayRef<const ParmVarDecl *> ParamVars) {}

namespace {
bool ResolveTParamReferenceHelper(
                            StringRef Name,
                            const TemplateParameterList *TemplateParameters,
                            SmallVectorImpl<unsigned> *Position) {}
} // end anonymous namespace

bool Sema::resolveTParamReference(
                            StringRef Name,
                            const TemplateParameterList *TemplateParameters,
                            SmallVectorImpl<unsigned> *Position) {}

namespace {
void CorrectTypoInTParamReferenceHelper(
                            const TemplateParameterList *TemplateParameters,
                            SimpleTypoCorrector &Corrector) {}
} // end anonymous namespace

StringRef Sema::correctTypoInTParamReference(
                            StringRef Typo,
                            const TemplateParameterList *TemplateParameters) {}

InlineCommandRenderKind Sema::getInlineCommandRenderKind(StringRef Name) const {}

} // end namespace comments
} // end namespace clang