Lines Matching refs:sema
1 //=- AnalysisBasedWarnings.cpp - Sema warnings based on libAnalysis -*- C++ -*-=//
11 // Together they are used by Sema to issue warnings based on inexpensive
16 #include "clang/Sema/AnalysisBasedWarnings.h"
38 #include "clang/Sema/ScopeInfo.h"
39 #include "clang/Sema/SemaInternal.h"
63 Sema &S;
65 UnreachableCodeHandler(Sema &s) : S(s) {}
74 static void CheckUnreachable(Sema &S, AnalysisDeclContext &AC) {
323 static void CheckFallThroughForBody(Sema &S, const Decl *D, const Stmt *Body,
433 static bool SuggestInitializationFixit(Sema &S, const VarDecl *VD) {
464 static void CreateIfFixit(Sema &S, const Stmt *If, const Stmt *Then,
491 static void DiagUninitUse(Sema &S, const VarDecl *VD, const UninitUse &Use,
633 static bool DiagnoseUninitializedUse(Sema &S, const VarDecl *VD,
687 FallthroughMapper(Sema &S)
855 Sema &S;
860 static void DiagnoseSwitchLabelsFallthrough(Sema &S, AnalysisDeclContext &AC,
951 sema::FunctionScopeInfo::WeakObjectUseMap::const_iterator>
994 static void diagnoseRepeatedUseOfWeak(Sema &S,
995 const sema::FunctionScopeInfo *CurFn,
998 typedef sema::FunctionScopeInfo::WeakObjectProfileTy WeakObjectProfileTy;
999 typedef sema::FunctionScopeInfo::WeakObjectUseMap WeakObjectUseMap;
1000 typedef sema::FunctionScopeInfo::WeakUseVector WeakUseVector;
1066 // possibilities all throughout Sema?
1074 if (isa<sema::BlockScopeInfo>(CurFn))
1076 else if (isa<sema::LambdaScopeInfo>(CurFn))
1155 Sema &S;
1165 UninitValsDiagReporter(Sema &S) : S(S), uses(0) {}
1267 Sema &S;
1282 ThreadSafetyReporter(Sema &S, SourceLocation FL, SourceLocation FEL)
1415 // AnalysisBasedWarnings - Worker object used by Sema to execute analysis-based
1419 clang::sema::AnalysisBasedWarnings::Policy::Policy() {
1425 clang::sema::AnalysisBasedWarnings::AnalysisBasedWarnings(Sema &s)
1446 static void flushDiagnostics(Sema &S, sema::FunctionScopeInfo *fscope) {
1447 for (SmallVectorImpl<sema::PossiblyUnreachableDiag>::iterator
1451 const sema::PossiblyUnreachableDiag &D = *i;
1456 void clang::sema::
1457 AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
1458 sema::FunctionScopeInfo *fscope,
1527 for (SmallVectorImpl<sema::PossiblyUnreachableDiag>::iterator
1537 for (SmallVectorImpl<sema::PossiblyUnreachableDiag>::iterator
1542 const sema::PossiblyUnreachableDiag &D = *i;
1550 // edge cases; see test/Sema/vla-2.c.
1665 void clang::sema::AnalysisBasedWarnings::PrintStats() const {