Lines Matching refs:Sema
1 //===--- Sema.cpp - AST Builder and Semantic Analysis Implementation ------===//
32 #include "clang/Sema/CXXFieldCollector.h"
33 #include "clang/Sema/DelayedDiagnostic.h"
34 #include "clang/Sema/ExternalSemaSource.h"
35 #include "clang/Sema/Initialization.h"
36 #include "clang/Sema/MultiplexExternalSemaSource.h"
37 #include "clang/Sema/ObjCMethodList.h"
38 #include "clang/Sema/Scope.h"
39 #include "clang/Sema/ScopeInfo.h"
40 #include "clang/Sema/SemaConsumer.h"
41 #include "clang/Sema/SemaInternal.h"
42 #include "clang/Sema/TemplateDeduction.h"
43 #include "clang/Sema/TemplateInstCallback.h"
44 #include "clang/Sema/TypoCorrection.h"
50 using namespace sema;
52 SourceLocation Sema::getLocForEndOfToken(SourceLocation Loc, unsigned Offset) {
56 ModuleLoader &Sema::getModuleLoader() const { return PP.getModuleLoader(); }
59 Sema::InventAbbreviatedTemplateParameterTypeName(IdentifierInfo *ParamName,
73 PrintingPolicy Sema::getPrintingPolicy(const ASTContext &Context,
90 void Sema::ActOnTranslationUnitScope(Scope *S) {
96 namespace sema {
99 Sema *S = nullptr;
103 void set(Sema &S) { this->S = &S; }
125 Sema::PragmaAlignPackDiagnoseKind::NonDefaultStateAtInclude,
136 Sema::PragmaAlignPackDiagnoseKind::ChangedStateAtExit,
146 } // end namespace sema
149 const unsigned Sema::MaxAlignmentExponent;
150 const unsigned Sema::MaximumAlignment;
152 Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
209 std::unique_ptr<sema::SemaPPCallbacks> Callbacks =
210 std::make_unique<sema::SemaPPCallbacks>();
216 // Anchor Sema's type info to this TU.
217 void Sema::anchor() {}
219 void Sema::addImplicitTypedef(StringRef Name, QualType T) {
225 void Sema::Initialize() {
229 // Tell the external Sema source about this Sema object.
411 Sema::~Sema() {
418 for (sema::FunctionScopeInfo *FSI : FunctionScopes)
425 // Detach from the external Sema source.
430 // If Sema's ExternalSource is the multiplexer - we own it.
447 // Detach from the PP callback handler which outlives Sema since it's owned
452 void Sema::warnStackExhausted(SourceLocation Loc) {
460 void Sema::runWithSufficientStackSpace(SourceLocation Loc,
469 bool Sema::makeUnavailableInSystemHeader(SourceLocation loc,
490 ASTMutationListener *Sema::getASTMutationListener() const {
497 ///\param[in] E - A non-null external sema source.
499 void Sema::addExternalSource(ExternalSemaSource *E) {
516 void Sema::PrintStats() const {
524 void Sema::diagnoseNullableToNonnullConversion(QualType DstType,
539 void Sema::diagnoseZeroToNullptrConversion(CastKind Kind, const Expr* E) {
574 ExprResult Sema::ImpCastExprToType(Expr *E, QualType Ty,
634 CastKind Sema::ScalarTypeToBooleanCastKind(QualType ScalarTy) {
650 /// Used to prune the decls of Sema's UnusedFileScopedDecls vector.
651 static bool ShouldRemoveFromUnused(Sema *SemaRef, const DeclaratorDecl *D) {
720 bool Sema::isExternalWithNoLinkageType(ValueDecl *VD) {
731 void Sema::getUndefinedButUsed(
784 static void checkUndefinedButUsed(Sema &S) {
834 void Sema::LoadExternalWeakUndeclaredIdentifiers() {
925 void Sema::emitAndClearUnusedLocalTypedefWarnings() {
941 void Sema::ActOnStartOfTranslationUnit() {
953 void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) {
1021 void Sema::ActOnEndOfTranslationUnit() {
1333 DeclContext *Sema::getFunctionLevelDeclContext() {
1354 FunctionDecl *Sema::getCurFunctionDecl() {
1359 ObjCMethodDecl *Sema::getCurMethodDecl() {
1366 NamedDecl *Sema::getCurFunctionOrMethodDecl() {
1373 LangAS Sema::getDefaultCXXMethodAddrSpace() const {
1379 void Sema::EmitCurrentDiagnostic(unsigned DiagID) {
1439 // The last diagnostic which Sema produced was ignored. Suppress any
1477 Sema::SemaDiagnosticBuilder
1478 Sema::Diag(SourceLocation Loc, const PartialDiagnostic &PD, bool DeferHint) {
1482 bool Sema::hasUncompilableErrorOccurred() const {
1500 static void emitCallStackNotes(Sema &S, FunctionDecl *FD) {
1567 DeferredDiagnosticsEmitter(Sema &S)
1635 Sema::FunctionEmissionStatus::Emitted;
1672 void Sema::emitDeferredDiags() {
1706 // Otherwise, we "defer" the diagnostic. It sits in Sema::DeviceDeferredDiags
1710 Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder(Kind K, SourceLocation Loc,
1712 FunctionDecl *Fn, Sema &S)
1732 Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder(SemaDiagnosticBuilder &&D)
1742 Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder() {
1757 Sema::SemaDiagnosticBuilder
1758 Sema::targetDiag(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD) {
1774 Sema::SemaDiagnosticBuilder Sema::Diag(SourceLocation Loc, unsigned DiagID,
1797 void Sema::checkDeviceDecl(ValueDecl *D, SourceLocation Loc) {
1863 bool Sema::findMacroSpelling(SourceLocation &locref, StringRef name) {
1891 Scope *Sema::getScopeForContext(DeclContext *Ctx) {
1910 void Sema::PushFunctionScope() {
1922 void Sema::PushBlockScope(Scope *BlockScope, BlockDecl *Block) {
1927 LambdaScopeInfo *Sema::PushLambdaScope() {
1933 void Sema::RecordParsingTemplateParameterDepth(unsigned Depth) {
1944 static void checkEscapingByref(VarDecl *VD, Sema &S) {
1947 S, Sema::ExpressionEvaluationContext::PotentiallyEvaluated);
1969 static void markEscapingByrefs(const FunctionScopeInfo &FSI, Sema &S) {
1989 Sema::NTCUC_BlockCapture,
1990 Sema::NTCUK_Destruct|Sema::NTCUK_Copy);
2014 Sema::PoppedFunctionScopePtr
2015 Sema::PopFunctionScopeInfo(const AnalysisBasedWarnings::Policy *WP,
2037 void Sema::PoppedFunctionScopeDeleter::
2038 operator()(sema::FunctionScopeInfo *Scope) const {
2046 void Sema::PushCompoundScope(bool IsStmtExpr) {
2050 void Sema::PopCompoundScope() {
2059 bool Sema::hasAnyUnrecoverableErrorsInThisFunction() const {
2063 void Sema::setFunctionHasBranchIntoScope() {
2068 void Sema::setFunctionHasBranchProtectedScope() {
2073 void Sema::setFunctionHasIndirectGoto() {
2078 void Sema::setFunctionHasMustTail() {
2083 BlockScopeInfo *Sema::getCurBlock() {
2098 FunctionScopeInfo *Sema::getEnclosingFunction() const {
2103 if (isa<sema::BlockScopeInfo>(FunctionScopes[e]))
2110 LambdaScopeInfo *Sema::getEnclosingLambda() const {
2112 if (auto *LSI = dyn_cast<sema
2126 LambdaScopeInfo *Sema::getCurLambda(bool IgnoreNonLambdaCapturingScope) {
2151 LambdaScopeInfo *Sema::getCurGenericLambda() {
2160 void Sema::ActOnComment(SourceRange Comment) {
2214 bool Sema::tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy,
2272 Sema::TentativeAnalysisScope Trap(*this);
2321 static void noteOverloads(Sema &S, const UnresolvedSetImpl &Overloads,
2350 static void notePlausibleOverloads(Sema &S, SourceLocation Loc,
2394 bool Sema::tryToRecoverWithCall(ExprResult &E, const PartialDiagnostic &PD,
2435 IdentifierInfo *Sema::getSuperIdentifier() const {
2441 IdentifierInfo *Sema::getFloat128Identifier() const {
2447 void Sema::PushCapturedRegionScope(Scope *S, CapturedDecl *CD, RecordDecl *RD,
2458 CapturedRegionScopeInfo *Sema::getCurCapturedRegion() {
2465 const llvm::MapVector<FieldDecl *, Sema::DeleteLocs> &
2466 Sema::getMismatchingDeleteExpressions() const {