#include "UsedDeclVisitor.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/ASTDiagnostic.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclFriend.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/PrettyDeclStackTrace.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/TypeOrdering.h"
#include "clang/Basic/DarwinSDKInfo.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/PartialDiagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/Stack.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/CXXFieldCollector.h"
#include "clang/Sema/DelayedDiagnostic.h"
#include "clang/Sema/EnterExpressionEvaluationContext.h"
#include "clang/Sema/ExternalSemaSource.h"
#include "clang/Sema/Initialization.h"
#include "clang/Sema/MultiplexExternalSemaSource.h"
#include "clang/Sema/ObjCMethodList.h"
#include "clang/Sema/RISCVIntrinsicManager.h"
#include "clang/Sema/Scope.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaAMDGPU.h"
#include "clang/Sema/SemaARM.h"
#include "clang/Sema/SemaAVR.h"
#include "clang/Sema/SemaBPF.h"
#include "clang/Sema/SemaCUDA.h"
#include "clang/Sema/SemaCodeCompletion.h"
#include "clang/Sema/SemaConsumer.h"
#include "clang/Sema/SemaHLSL.h"
#include "clang/Sema/SemaHexagon.h"
#include "clang/Sema/SemaInternal.h"
#include "clang/Sema/SemaLoongArch.h"
#include "clang/Sema/SemaM68k.h"
#include "clang/Sema/SemaMIPS.h"
#include "clang/Sema/SemaMSP430.h"
#include "clang/Sema/SemaNVPTX.h"
#include "clang/Sema/SemaObjC.h"
#include "clang/Sema/SemaOpenACC.h"
#include "clang/Sema/SemaOpenCL.h"
#include "clang/Sema/SemaOpenMP.h"
#include "clang/Sema/SemaPPC.h"
#include "clang/Sema/SemaPseudoObject.h"
#include "clang/Sema/SemaRISCV.h"
#include "clang/Sema/SemaSYCL.h"
#include "clang/Sema/SemaSwift.h"
#include "clang/Sema/SemaSystemZ.h"
#include "clang/Sema/SemaWasm.h"
#include "clang/Sema/SemaX86.h"
#include "clang/Sema/TemplateDeduction.h"
#include "clang/Sema/TemplateInstCallback.h"
#include "clang/Sema/TypoCorrection.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/TimeProfiler.h"
#include <optional>
usingnamespaceclang;
usingnamespacesema;
SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc, unsigned Offset) { … }
ModuleLoader &Sema::getModuleLoader() const { … }
DarwinSDKInfo *
Sema::getDarwinSDKInfoForAvailabilityChecking(SourceLocation Loc,
StringRef Platform) { … }
DarwinSDKInfo *Sema::getDarwinSDKInfoForAvailabilityChecking() { … }
IdentifierInfo *Sema::InventAbbreviatedTemplateParameterTypeName(
const IdentifierInfo *ParamName, unsigned int Index) { … }
PrintingPolicy Sema::getPrintingPolicy(const ASTContext &Context,
const Preprocessor &PP) { … }
void Sema::ActOnTranslationUnitScope(Scope *S) { … }
namespace clang {
namespace sema {
class SemaPPCallbacks : public PPCallbacks { … };
}
}
const unsigned Sema::MaxAlignmentExponent;
const uint64_t Sema::MaximumAlignment;
Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
TranslationUnitKind TUKind, CodeCompleteConsumer *CodeCompleter)
: … { … }
void Sema::anchor() { … }
void Sema::addImplicitTypedef(StringRef Name, QualType T) { … }
void Sema::Initialize() { … }
Sema::~Sema() { … }
void Sema::warnStackExhausted(SourceLocation Loc) { … }
void Sema::runWithSufficientStackSpace(SourceLocation Loc,
llvm::function_ref<void()> Fn) { … }
bool Sema::makeUnavailableInSystemHeader(SourceLocation loc,
UnavailableAttr::ImplicitReason reason) { … }
ASTMutationListener *Sema::getASTMutationListener() const { … }
void Sema::addExternalSource(ExternalSemaSource *E) { … }
void Sema::PrintStats() const { … }
void Sema::diagnoseNullableToNonnullConversion(QualType DstType,
QualType SrcType,
SourceLocation Loc) { … }
void Sema::diagnoseFunctionEffectConversion(QualType DstType, QualType SrcType,
SourceLocation Loc) { … }
void Sema::diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E) { … }
ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
CastKind Kind, ExprValueKind VK,
const CXXCastPath *BasePath,
CheckedConversionKind CCK) { … }
CastKind Sema::ScalarTypeToBooleanCastKind(QualType ScalarTy) { … }
static bool ShouldRemoveFromUnused(Sema *SemaRef, const DeclaratorDecl *D) { … }
static bool isFunctionOrVarDeclExternC(const NamedDecl *ND) { … }
bool Sema::isExternalWithNoLinkageType(const ValueDecl *VD) const { … }
void Sema::getUndefinedButUsed(
SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> > &Undefined) { … }
static void checkUndefinedButUsed(Sema &S) { … }
void Sema::LoadExternalWeakUndeclaredIdentifiers() { … }
RecordCompleteMap;
static bool MethodsAndNestedClassesComplete(const CXXRecordDecl *RD,
RecordCompleteMap &MNCComplete) { … }
static bool IsRecordFullyDefined(const CXXRecordDecl *RD,
RecordCompleteMap &RecordsComplete,
RecordCompleteMap &MNCComplete) { … }
void Sema::emitAndClearUnusedLocalTypedefWarnings() { … }
void Sema::ActOnStartOfTranslationUnit() { … }
void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) { … }
void Sema::ActOnEndOfTranslationUnit() { … }
DeclContext *Sema::getFunctionLevelDeclContext(bool AllowLambda) const { … }
FunctionDecl *Sema::getCurFunctionDecl(bool AllowLambda) const { … }
ObjCMethodDecl *Sema::getCurMethodDecl() { … }
NamedDecl *Sema::getCurFunctionOrMethodDecl() const { … }
LangAS Sema::getDefaultCXXMethodAddrSpace() const { … }
void Sema::EmitDiagnostic(unsigned DiagID, const DiagnosticBuilder &DB) { … }
bool Sema::hasUncompilableErrorOccurred() const { … }
static void emitCallStackNotes(Sema &S, const FunctionDecl *FD) { … }
namespace {
class DeferredDiagnosticsEmitter
: public UsedDeclVisitor<DeferredDiagnosticsEmitter> { … };
}
void Sema::emitDeferredDiags() { … }
Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder(Kind K, SourceLocation Loc,
unsigned DiagID,
const FunctionDecl *Fn,
Sema &S)
: … { … }
Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder(SemaDiagnosticBuilder &&D)
: … { … }
Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() { … }
Sema::SemaDiagnosticBuilder
Sema::targetDiag(SourceLocation Loc, unsigned DiagID, const FunctionDecl *FD) { … }
void Sema::checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D) { … }
bool Sema::findMacroSpelling(SourceLocation &locref, StringRef name) { … }
Scope *Sema::getScopeForContext(DeclContext *Ctx) { … }
void Sema::PushFunctionScope() { … }
void Sema::PushBlockScope(Scope *BlockScope, BlockDecl *Block) { … }
LambdaScopeInfo *Sema::PushLambdaScope() { … }
void Sema::RecordParsingTemplateParameterDepth(unsigned Depth) { … }
static void checkEscapingByref(VarDecl *VD, Sema &S) { … }
static void markEscapingByrefs(const FunctionScopeInfo &FSI, Sema &S) { … }
Sema::PoppedFunctionScopePtr
Sema::PopFunctionScopeInfo(const AnalysisBasedWarnings::Policy *WP,
const Decl *D, QualType BlockType) { … }
void Sema::PoppedFunctionScopeDeleter::
operator()(sema::FunctionScopeInfo *Scope) const { … }
void Sema::PushCompoundScope(bool IsStmtExpr) { … }
void Sema::PopCompoundScope() { … }
bool Sema::hasAnyUnrecoverableErrorsInThisFunction() const { … }
void Sema::setFunctionHasBranchIntoScope() { … }
void Sema::setFunctionHasBranchProtectedScope() { … }
void Sema::setFunctionHasIndirectGoto() { … }
void Sema::setFunctionHasMustTail() { … }
BlockScopeInfo *Sema::getCurBlock() { … }
FunctionScopeInfo *Sema::getEnclosingFunction() const { … }
LambdaScopeInfo *Sema::getEnclosingLambda() const { … }
LambdaScopeInfo *Sema::getCurLambda(bool IgnoreNonLambdaCapturingScope) { … }
LambdaScopeInfo *Sema::getCurGenericLambda() { … }
void Sema::ActOnComment(SourceRange Comment) { … }
ExternalSemaSource::~ExternalSemaSource() { … }
char ExternalSemaSource::ID;
void ExternalSemaSource::ReadMethodPool(Selector Sel) { … }
void ExternalSemaSource::updateOutOfDateSelector(Selector Sel) { … }
void ExternalSemaSource::ReadKnownNamespaces(
SmallVectorImpl<NamespaceDecl *> &Namespaces) { … }
void ExternalSemaSource::ReadUndefinedButUsed(
llvm::MapVector<NamedDecl *, SourceLocation> &Undefined) { … }
void ExternalSemaSource::ReadMismatchingDeleteExpressions(llvm::MapVector<
FieldDecl *, llvm::SmallVector<std::pair<SourceLocation, bool>, 4>> &) { … }
bool Sema::tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy,
UnresolvedSetImpl &OverloadSet) { … }
static void noteOverloads(Sema &S, const UnresolvedSetImpl &Overloads,
const SourceLocation FinalNoteLoc) { … }
static void notePlausibleOverloads(Sema &S, SourceLocation Loc,
const UnresolvedSetImpl &Overloads,
bool (*IsPlausibleResult)(QualType)) { … }
static bool IsCallableWithAppend(const Expr *E) { … }
static bool IsCPUDispatchCPUSpecificMultiVersion(const Expr *E) { … }
bool Sema::tryToRecoverWithCall(ExprResult &E, const PartialDiagnostic &PD,
bool ForceComplain,
bool (*IsPlausibleResult)(QualType)) { … }
IdentifierInfo *Sema::getSuperIdentifier() const { … }
void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD,
CapturedRegionKind K,
unsigned OpenMPCaptureLevel) { … }
CapturedRegionScopeInfo *Sema::getCurCapturedRegion() { … }
const llvm::MapVector<FieldDecl *, Sema::DeleteLocs> &
Sema::getMismatchingDeleteExpressions() const { … }
Sema::FPFeaturesStateRAII::FPFeaturesStateRAII(Sema &S)
: … { … }
Sema::FPFeaturesStateRAII::~FPFeaturesStateRAII() { … }
bool Sema::isDeclaratorFunctionLike(Declarator &D) { … }