clang API Documentation
#include "clang/Sema/AnalysisBasedWarnings.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/EvaluatedExprVisitor.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/ExprObjC.h"
#include "clang/AST/ParentMap.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/AST/StmtCXX.h"
#include "clang/AST/StmtObjC.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Analysis/Analyses/CFGReachabilityAnalysis.h"
#include "clang/Analysis/Analyses/Consumed.h"
#include "clang/Analysis/Analyses/ReachableCode.h"
#include "clang/Analysis/Analyses/ThreadSafety.h"
#include "clang/Analysis/Analyses/UninitializedValues.h"
#include "clang/Analysis/AnalysisContext.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/CFGStmtMap.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/ScopeInfo.h"
#include "clang/Sema/SemaInternal.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/ImmutableMap.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include <algorithm>
#include <deque>
#include <iterator>
#include <vector>
Go to the source code of this file.
enum ControlFlowKind |
UnknownFallThrough | |
NeverFallThrough | |
MaybeFallThrough | |
AlwaysFallThrough | |
NeverFallThroughOrReturn |
Definition at line 266 of file AnalysisBasedWarnings.cpp.
enum RecursiveState |
Definition at line 167 of file AnalysisBasedWarnings.cpp.
static ControlFlowKind CheckFallThrough | ( | AnalysisDeclContext & | AC | ) | [static] |
CheckFallThrough - Check that we don't fall off the end of a Statement that should return a value.
Definition at line 283 of file AnalysisBasedWarnings.cpp.
References AlwaysFallThrough, clang::CFGElement::castAs(), clang::AnalysisDeclContext::getAddEHEdges(), clang::CFGElement::getAs(), clang::CFGBlock::getBlockID(), clang::AnalysisDeclContext::getCFG(), clang::CFG::getEntry(), clang::CFG::getNumBlockIDs(), clang::CFGStmt::getStmt(), clang::CFGBlock::getTerminator(), clang::CFGBlock::FilteredCFGBlockIterator< IMPL, IsPred >::hasMore(), clang::CFGBlock::hasNoReturnElement(), clang::CFGBlock::FilterOptions::IgnoreDefaultsWithCoveredEnums, MaybeFallThrough, NeverFallThrough, NeverFallThroughOrReturn, clang::CFGBlock::rbegin(), clang::CFGBlock::rend(), S, clang::reachable_code::ScanReachableFromBlock(), clang::CFGBlock::succ_begin(), clang::CFGBlock::succ_end(), and UnknownFallThrough.
Referenced by CheckFallThroughForBody().
static void CheckFallThroughForBody | ( | Sema & | S, |
const Decl * | D, | ||
const Stmt * | Body, | ||
const BlockExpr * | blkExpr, | ||
const CheckFallThroughDiagnostics & | CD, | ||
AnalysisDeclContext & | AC | ||
) | [static] |
CheckFallThroughForFunctionDef - Check that we don't fall off the end of a function that should return a value. Check that we don't fall off the end of a noreturn function. We assume that functions and blocks not marked noreturn will return.
Definition at line 500 of file AnalysisBasedWarnings.cpp.
References AlwaysFallThrough, CheckFallThrough(), clang::Sema::Diag(), clang::Type::getAs(), clang::Sema::getDiagnostics(), clang::Stmt::getLocEnd(), clang::Stmt::getLocStart(), clang::Type::getPointeeType(), clang::Expr::getType(), MaybeFallThrough, NeverFallThrough, NeverFallThroughOrReturn, and UnknownFallThrough.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
static void checkForFunctionCall | ( | Sema & | S, |
const FunctionDecl * | FD, | ||
CFGBlock & | Block, | ||
unsigned | ExitID, | ||
llvm::SmallVectorImpl< RecursiveState > & | States, | ||
RecursiveState | State | ||
) | [static] |
Definition at line 173 of file AnalysisBasedWarnings.cpp.
References FoundPath, FoundPathWithNoRecursiveCall, clang::CFGBlock::getBlockID(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), clang::Decl::getCanonicalDecl(), clang::Expr::IgnoreParenImpCasts(), State, clang::CFGElement::Statement, clang::CFGBlock::succ_begin(), clang::CFGBlock::succ_end(), and clang::NestedNameSpecifier::TypeSpec.
Referenced by checkRecursiveFunction().
static void checkRecursiveFunction | ( | Sema & | S, |
const FunctionDecl * | FD, | ||
const Stmt * | Body, | ||
AnalysisDeclContext & | AC | ||
) | [static] |
Definition at line 232 of file AnalysisBasedWarnings.cpp.
References checkForFunctionCall(), clang::Sema::Diag(), FoundNoPath, FoundPath, FoundPathWithNoRecursiveCall, clang::CFGBlock::getBlockID(), clang::FunctionDecl::getCanonicalDecl(), clang::AnalysisDeclContext::getCFG(), clang::CFG::getEntry(), clang::CFG::getExit(), clang::Stmt::getLocStart(), clang::CFG::getNumBlockIDs(), clang::FunctionDecl::getTemplatedKind(), clang::CFGBlock::pred_empty(), clang::FunctionDecl::TK_MemberSpecialization, and clang::FunctionDecl::TK_NonTemplate.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
static void CheckUnreachable | ( | Sema & | S, |
AnalysisDeclContext & | AC | ||
) | [static] |
CheckUnreachable - Check for unreachable code.
Definition at line 105 of file AnalysisBasedWarnings.cpp.
References clang::reachable_code::FindUnreachableCode(), clang::AnalysisDeclContext::getDecl(), clang::Decl::getLocStart(), clang::Sema::getPreprocessor(), clang::Sema::getSourceManager(), and clang::SourceManager::isInMainFile().
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
static void CreateIfFixit | ( | Sema & | S, |
const Stmt * | If, | ||
const Stmt * | Then, | ||
const Stmt * | Else, | ||
bool | CondVal, | ||
FixItHint & | Fixit1, | ||
FixItHint & | Fixit2 | ||
) | [static] |
Create a fixit to remove an if-like statement, on the assumption that its condition is CondVal.
Definition at line 635 of file AnalysisBasedWarnings.cpp.
References clang::FixItHint::CreateRemoval(), clang::CharSourceRange::getCharRange(), clang::Sema::getLangOpts(), clang::Stmt::getLocEnd(), clang::Lexer::getLocForEndOfToken(), clang::Stmt::getLocStart(), clang::Sema::getSourceManager(), and clang::Stmt::getSourceRange().
Referenced by DiagUninitUse().
static void diagnoseRepeatedUseOfWeak | ( | Sema & | S, |
const sema::FunctionScopeInfo * | CurFn, | ||
const Decl * | D, | ||
const ParentMap & | PM | ||
) | [static] |
Definition at line 1172 of file AnalysisBasedWarnings.cpp.
References clang::CodeGen::Base, clang::Sema::Diag(), clang::Sema::getASTContext(), clang::Stmt::getLocStart(), clang::Sema::getSourceManager(), clang::Stmt::getSourceRange(), clang::sema::FunctionScopeInfo::getWeakObjectUses(), clang::SourceManager::isBeforeInTranslationUnit(), isInLoop(), and SM.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
static void DiagnoseSwitchLabelsFallthrough | ( | Sema & | S, |
AnalysisDeclContext & | AC, | ||
bool | PerFunction | ||
) | [static] |
Definition at line 1061 of file AnalysisBasedWarnings.cpp.
References clang::FixItHint::CreateInsertion(), clang::Sema::Diag(), clang::CFGBlock::empty(), clang::AnalysisDeclContext::getASTContext(), clang::AnalysisDeclContext::getBody(), clang::AnalysisDeclContext::getCFG(), clang::Preprocessor::getIdentifierInfo(), clang::CFGBlock::getLabel(), clang::ASTContext::getLangOpts(), clang::Sema::getLangOpts(), clang::Preprocessor::getLastMacroWithSpelling(), clang::Stmt::getLocStart(), clang::Sema::getPreprocessor(), clang::CFGBlock::getTerminator(), clang::SourceLocation::isMacroID(), clang::CFG::rbegin(), clang::CFG::rend(), clang::CFGBlock::succ_begin(), clang::CFGBlock::succ_size(), and Tokens.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
static bool DiagnoseUninitializedUse | ( | Sema & | S, |
const VarDecl * | VD, | ||
const UninitUse & | Use, | ||
bool | alwaysReportSelfInit = false |
||
) | [static] |
DiagnoseUninitializedUse -- Helper function for diagnosing uses of an uninitialized variable. This manages the different forms of diagnostic emitted for particular types of uses. Returns true if the use was diagnosed as a warning. If a particular use is one we omit warnings for, returns false.
Definition at line 834 of file AnalysisBasedWarnings.cpp.
References clang::Sema::Context, clang::Sema::Diag(), DiagUninitUse(), clang::NamedDecl::getDeclName(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::BlockExpr::getLocStart(), clang::ValueDecl::getType(), clang::UninitUse::getUser(), clang::Decl::hasAttr(), clang::Type::isBlockPointerType(), and SuggestInitializationFixit().
static void DiagUninitUse | ( | Sema & | S, |
const VarDecl * | VD, | ||
const UninitUse & | Use, | ||
bool | IsCapturedByBlock | ||
) | [static] |
DiagUninitUse -- Helper function to produce a diagnostic for an uninitialized use of a variable.
Definition at line 662 of file AnalysisBasedWarnings.cpp.
References clang::UninitUse::AfterCall, clang::UninitUse::AfterDecl, clang::UninitUse::Always, clang::BO_LAnd, clang::BO_LOr, clang::UninitUse::branch_begin(), clang::UninitUse::branch_end(), CreateIfFixit(), clang::FixItHint::CreateRemoval(), clang::FixItHint::CreateReplacement(), clang::Sema::Diag(), clang::SourceRange::getBegin(), clang::CharSourceRange::getBegin(), clang::IfStmt::getCond(), clang::ConditionalOperator::getCond(), clang::NamedDecl::getDeclName(), clang::IfStmt::getElse(), clang::ConditionalOperator::getFalseExpr(), clang::UninitUse::getKind(), clang::Sema::getLangOpts(), clang::Decl::getLexicalDeclContext(), clang::BinaryOperator::getLHS(), clang::Decl::getLocation(), clang::Stmt::getLocStart(), clang::BinaryOperator::getLocStart(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getOpcodeStr(), clang::BinaryOperator::getOperatorLoc(), clang::Stmt::getSourceRange(), clang::VarDecl::getSourceRange(), clang::Stmt::getStmtClass(), clang::IfStmt::getThen(), clang::ConditionalOperator::getTrueExpr(), clang::UninitUse::getUser(), clang::BinaryOperator::isLogicalOp(), clang::UninitUse::Maybe, clang::FixItHint::RemoveRange, and clang::UninitUse::Sometimes.
Referenced by DiagnoseUninitializedUse().
static void flushDiagnostics | ( | Sema & | S, |
const sema::FunctionScopeInfo * | fscope | ||
) | [static] |
Definition at line 1829 of file AnalysisBasedWarnings.cpp.
References clang::Sema::Diag(), and clang::sema::FunctionScopeInfo::PossiblyUnreachableDiags.
Referenced by clang::sema::AnalysisBasedWarnings::IssueWarnings().
static unsigned isEnabled | ( | DiagnosticsEngine & | D, |
unsigned | diag | ||
) | [static] |
Definition at line 1797 of file AnalysisBasedWarnings.cpp.
References clang::DiagnosticsEngine::isIgnored().
Referenced by clang::sema::AnalysisBasedWarnings::AnalysisBasedWarnings().
static bool isInLoop | ( | const ASTContext & | Ctx, |
const ParentMap & | PM, | ||
const Stmt * | S | ||
) | [static] |
Definition at line 1145 of file AnalysisBasedWarnings.cpp.
References clang::Expr::EvaluateAsInt(), clang::ParentMap::getParent(), clang::Stmt::getStmtClass(), and S.
Referenced by diagnoseRepeatedUseOfWeak().
static bool SuggestInitializationFixit | ( | Sema & | S, |
const VarDecl * | VD | ||
) | [static] |
Definition at line 603 of file AnalysisBasedWarnings.cpp.
References clang::FixItHint::CreateInsertion(), clang::Sema::Diag(), clang::QualType::getCanonicalType(), clang::NamedDecl::getDeclName(), clang::Sema::getFixItZeroInitializerForType(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::Decl::getLocEnd(), clang::Sema::getLocForEndOfToken(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Type::isBlockPointerType(), and clang::SourceLocation::isMacroID().
Referenced by DiagnoseUninitializedUse().
Definition at line 1703 of file AnalysisBasedWarnings.cpp.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXThrow(), clang::Sema::ActOnDefs(), clang::Sema::ActOnFinishFunctionBody(), clang::Sema::ActOnFriendFunctionDecl(), clang::Sema::ActOnFunctionDeclarator(), clang::Sema::ActOnMemberAccessExpr(), clang::Sema::ActOnOpenMPParallelSectionsDirective(), clang::Sema::ActOnOpenMPSectionsDirective(), clang::Sema::ActOnSizeofParameterPackExpr(), clang::Sema::ActOnStartOfSwitchStmt(), clang::Sema::ActOnSuperScopeSpecifier(), clang::Sema::ActOnTranslationUnitScope(), clang::Sema::ActOnVariableDeclarator(), clang::InitializationSequence::AddAddressOverloadResolutionStep(), clang::InitializationSequence::AddArrayInitStep(), clang::InitializationSequence::AddAtomicConversionStep(), clang::InitializationSequence::AddCAssignmentStep(), clang::InitializationSequence::AddConstructorInitializationStep(), clang::InitializationSequence::AddConversionSequenceStep(), clang::InitializationSequence::AddDerivedToBaseCastStep(), clang::InitializationSequence::AddExtraneousCopyToTemporary(), clang::InitializationSequence::AddListInitializationStep(), clang::InitializationSequence::AddLValueToRValueStep(), clang::InitializationSequence::AddObjCObjectConversionStep(), clang::InitializationSequence::AddOCLSamplerInitStep(), clang::InitializationSequence::AddOCLZeroEventStep(), clang::InitializationSequence::AddParenthesizedArrayInitStep(), clang::InitializationSequence::AddProduceObjCObjectStep(), clang::InitializationSequence::AddQualificationConversionStep(), clang::InitializationSequence::AddReferenceBindingStep(), clang::InitializationSequence::AddStdInitializerListConstructionStep(), clang::DiagnosticBuilder::AddString(), clang::InitializationSequence::AddStringInitStep(), clang::InitializationSequence::AddUserConversionStep(), clang::InitializationSequence::AddZeroInitializationStep(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::BuildCXXNew(), clang::Sema::BuildMemInitializer(), BuildParentMap(), clang::Sema::BuildUsingDeclaration(), clang::Sema::CheckClassTemplate(), CheckConstexprFunctionStmt(), CheckFallThrough(), CheckIfAnyEnclosingLambdasMustCaptureAnyPotentialCaptures(), checkObjCDealloc(), CheckObjCInstMethSignature(), CheckOpenMPIterationSpace(), clang::Sema::CheckTemplateArgument(), ClassifyInternal(), clang::Sema::ClassifyName(), LogicalErrorHandler::compareAlwaysTrue(), LogicalErrorHandler::compareBitwiseEquality(), clang::Scope::containedInPrototypeScope(), clang::ento::containsEnum(), clang::ento::containsStaticLocal(), ConvertDeclSpecToType(), ConvertTypeToDiagnosticString(), clang::VerifyDiagnosticConsumer::Directive::create(), clang::ento::PathDiagnosticLocation::create(), clang::ento::PathDiagnosticLocation::createEndOfPath(), clang::PartialDiagnostic::StorageAllocator::Deallocate(), clang::Sema::DiagnoseAlwaysNonNullPointer(), clang::Sema::DiagnoseEmptyLookup(), DiagnoseInvalidRedeclaration(), clang::Sema::DiagnoseUnknownTypeName(), clang::Sema::DiagnoseUnusedExprResult(), clang::Sema::DiagnoseUseOfUnimplementedSelectors(), clang::ast_type_traits::DynTypedNode::dump(), clang::InitializationSequence::dump(), clang::CodeGen::CoverageMappingModuleGen::emit(), clang::CodeGen::CodeGenFunction::EmitAsmStmt(), clang::CodeGen::CodeGenFunction::EmitCaseStmt(), clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::EmitFunctionBody(), clang::CodeGen::CodeGenFunction::EmitIfStmt(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolStmt(), clang::CodeGen::CodeGenFunction::EmitStmt(), clang::VarDecl::ensureEvaluatedStmt(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), EvaluateStmt(), clang::threadSafety::findBlockLocations(), PackDeductionScope::finish(), clang::Sema::FinishCXXForRangeStmt(), clang::Sema::FinishObjCForCollectionStmt(), clang::Diagnostic::FormatDiagnostic(), clang::driver::Multilib::gccSuffix(), GenerateMinimalPathDiagnostic(), clang::CFGStmtMap::getBlock(), GetCurrentOrPreviousStmt(), clang::ento::bugreporter::GetDenomExpr(), clang::ento::bugreporter::getDerefExpr(), llvm::GraphTraits< clang::Stmt * >::getEntryNode(), llvm::GraphTraits< const clang::Stmt * >::getEntryNode(), GetFullTypeForDeclarator(), clang::VarDecl::getInit(), getLastStmt(), GetLLVMTLSModel(), clang::InitListExpr::getLocEnd(), clang::InitListExpr::getLocStart(), clang::ObjCMethodCall::getMessageKind(), clang::ento::PathDiagnosticLocation::getNextStmt(), clang::ento::NilReceiverBRVisitor::getNilReceiver(), llvm::DOTGraphTraits< ExplodedNode * >::getNodeLabel(), clang::FileManager::getNoncachedStatValue(), clang::Sema::getNonFieldDeclScope(), clang::ASTContext::getObjCEncodingForBlock(), clang::ASTContext::getObjCEncodingForFunctionDecl(), clang::ASTContext::getObjCEncodingForMethodDecl(), clang::ASTContext::getObjCEncodingForPropertyDecl(), clang::Sema::getObjCMessageKind(), getOptimizationLevel(), clang::ParentMap::getOuterParenParent(), clang::ParentMap::getParentIgnoreParenCasts(), clang::ParentMap::getParentIgnoreParenImpCasts(), clang::ParentMap::getParentIgnoreParens(), clang::CodeCompletionTUInfo::getParentName(), GetPreviousStmt(), clang::Sema::getPrintable(), clang::analyze_format_string::ArgType::getRepresentativeTypeName(), clang::ento::bugreporter::GetRetValExpr(), clang::Sema::getScopeForContext(), getSignature(), clang::ast_type_traits::DynTypedNode::getSourceRange(), clang::ento::BugReport::getStmt(), getStmtBeforeCond(), getStmtParent(), clang::ento::Environment::getSVal(), clang::ASTWriter::getSwitchCaseID(), getTerminatorCondition(), clang::Sema::getTypeName(), GetUnreachableLoc(), getValidSourceLocation(), handleComplexIntConversion(), handleDeprecatedAttr(), handleIntegerConversion(), handleObjCGCTypeAttr(), handleObjCOwnershipTypeAttr(), HashHMapKey(), clang::Expr::HasSideEffects(), clang::FunctionDecl::hasTrivialBody(), clang::Stmt::IgnoreContainers(), ignoreTransparentExprs(), clang::driver::Multilib::includeSuffix(), inferARCWriteback(), clang::PCHGenerator::InitializeSema(), clang::ASTReader::InitializeSema(), isCallableInState(), clang::ento::CallEvent::isCallStmt(), isConditionForTerminator(), isConfigurationValue(), IsControlFlowExpr(), clang::ObjCNoReturn::isImplicitNoReturn(), isIncrementOrInitInForLoop(), isInLoop(), isInLoopBody(), clang::Scope::isInObjcMethodOuterScope(), clang::Scope::isInObjcMethodScope(), clang::LiveVariables::isLive(), isNonEHScope(), clang::Scope::isSwitchScope(), IsUsedAsNormalCleanup(), LookThroughStmt(), clang::Sema::LookupTemplateName(), clang::Sema::LookupVisibleDecls(), clang::threadSafety::neverReturns(), clang::driver::Multilib::osSuffix(), clang::TreeTransform< Derived >::Owned(), clang::RawComment::parse(), clang::ParseAST(), clang::Sema::ParseObjCStringLiteral(), clang::InitializationSequence::Perform(), clang::CodeGen::CodeGenFunction::PopCleanupBlock(), clang::PrettyDeclStackTraceEntry::print(), clang::ento::Environment::print(), clang::ast_type_traits::DynTypedNode::print(), clang::APValue::printPretty(), ProcessDeclAttribute(), clang::Sema::ProcessStmtAttributes(), clang::ASTReader::ReadMethodPool(), clang::TreeTransform< Derived >::RebuildCaseStmtBody(), clang::ASTWriter::RecordSwitchCaseID(), clang::UsingDecl::removeShadowDecl(), clang::InitializationSequence::RewrapReferenceInitList(), clang::driver::SanitizerArgs::SanitizerArgs(), clang::ento::ProgramState::scanReachableSymbols(), clang::ASTWriter::SelectorRead(), clang::OMPExecutableDirective::setAssociatedStmt(), clang::ObjCSubscriptRefExpr::setBaseExpr(), clang::CXXForRangeStmt::setBeginEndStmt(), clang::ObjCForCollectionStmt::setBody(), clang::CXXForRangeStmt::setBody(), clang::SwitchStmt::setBody(), clang::WhileStmt::setBody(), clang::DoStmt::setBody(), clang::ForStmt::setBody(), clang::ObjCAtCatchStmt::setCatchBody(), clang::ObjCAtTryStmt::setCatchStmt(), clang::ObjCForCollectionStmt::setElement(), clang::IfStmt::setElse(), clang::ObjCAtFinallyStmt::setFinallyBody(), clang::ObjCAtTryStmt::setFinallyStmt(), clang::ForStmt::setInit(), clang::ObjCSubscriptRefExpr::setKeyExpr(), clang::CompoundStmt::setLastStmt(), clang::CXXForRangeStmt::setLoopVarStmt(), clang::threadSafety::til::Variable::setName(), clang::CXXForRangeStmt::setRangeStmt(), clang::ObjCSelectorExpr::setSelector(), clang::ObjCStringLiteral::setString(), clang::ObjCAutoreleasePoolStmt::setSubStmt(), clang::CaseStmt::setSubStmt(), clang::DefaultStmt::setSubStmt(), clang::StmtExpr::setSubStmt(), clang::ObjCAtSynchronizedStmt::setSynchBody(), clang::ObjCAtSynchronizedStmt::setSynchExpr(), clang::IfStmt::setThen(), clang::ObjCAtThrowStmt::setThrowExpr(), clang::ObjCAtTryStmt::setTryBody(), clang::DeclSpec::SetTypeSpecSign(), shouldEnableVectorizerAtOLevel(), clang::RecursiveASTVisitor< FindSuperCallVisitor >::shouldUseDataRecursionFor(), clang::Stmt::stripLabelLikeStatements(), clang::Sema::SubstStmt(), clang::ast_matchers::dynamic::Diagnostics::toString(), clang::ast_matchers::dynamic::Diagnostics::toStringFull(), transferARCOwnership(), transferARCOwnershipToDeclaratorChunk(), clang::TreeTransform< Derived >::TransformStmt(), clang::OverloadCandidate::TryToFixBadConversion(), clang::ConversionFixItGenerator::tryToFixConversion(), TryTypoCorrectionForCall(), clang::driver::toolchains::MachO::UseDwarfDebugFlags(), clang::ento::ExprEngine::Visit(), clang::ento::FindLastStoreBRVisitor::VisitNode(), and clang::Sema::CXXThisScopeRAII::~CXXThisScopeRAII().
SourceManager& SM [static] |
Definition at line 1425 of file AnalysisBasedWarnings.cpp.
Referenced by clang::ASTUnit::addFileLevelDecl(), addFixitForObjCARCConversion(), clang::arcmt::trans::MigrationContext::addPropertyAttribute(), clang::GCCAsmStmt::AnalyzeAsmString(), clang::tooling::Replacement::apply(), applyCocoaAPICheck(), applyEditsToTemp(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::ento::ProgramState::assumeInBound(), clang::CFGStmtMap::Build(), clang::ObjCMethodCall::canBeOverridenInSubclass(), checkObjCUnusedIvar(), compare(), comparePiece(), clang::ento::PathDiagnosticCallPiece::construct(), clang::Lexer::Create_PragmaLexer(), clang::ento::PathDiagnosticLocation::createBegin(), clang::ento::PathDiagnosticLocation::createConditionalColonLoc(), clang::ento::PathDiagnosticLocation::createEndOfPath(), clang::ento::PathDiagnosticLocation::createMemberLoc(), clang::ento::PathDiagnosticLocation::createOperatorLoc(), diagnoseRepeatedUseOfWeak(), clang::DoRewriteTest(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), clang::DiagnosticNoteRenderer::emitBuildingModuleLocation(), clang::DiagnosticRenderer::emitDiagnostic(), clang::DiagnosticNoteRenderer::emitImportLocation(), clang::DiagnosticNoteRenderer::emitIncludeLocation(), clang::markup::EmitLocation(), clang::CodeGenAction::ExecuteAction(), clang::DumpRawTokensAction::ExecuteAction(), clang::PrintPreprocessedAction::ExecuteAction(), clang::arcmt::trans::findSemiAfterLocation(), GCRewriteFinalize(), GenerateAlternateExtensivePathDiagnostic(), clang::ento::GRBugReporter::generatePathDiagnostic(), getAsmSrcLocInfo(), getAsPointeeSymbol(), clang::CFGStmtMap::getBlock(), clang::ento::LikelyFalsePositiveSuppressionBRVisitor::getEndPath(), clang::ASTUnit::getLocation(), getLocationForCaller(), clang::ento::ProgramState::getLValue(), GetMappedTokenLoc(), clang::FunctionDecl::getReturnTypeSourceRange(), clang::Sema::getUndefinedButUsed(), clang::VerifyDiagnosticConsumer::HandleComment(), clang::LogDiagnosticPrinter::HandleDiagnostic(), clang::html::HighlightMacros(), clang::html::HighlightRange(), clang::TokenLexer::Init(), isEmptyARCMTMacroStatement(), isExpandedFromConfigurationMacro(), clang::CodeGen::CodeGenModule::isInSanitizerBlacklist(), clang::ento::CallEvent::isInSystemHeader(), clang::TokenLexer::Lex(), LexRawTokensFromMainFile(), LocPropertyAttribute(), makeStandaloneDiagnostic(), clang::BeforeThanCompare< RawComment >::operator()(), clang::BeforeThanCompare< SourceLocation >::operator()(), clang::BeforeThanCompare< SourceRange >::operator()(), ReadLineMarkerFlags(), clang::RewriteIncludesInInput(), clang::RewriteMacrosInInput(), clang::arcmt::trans::MigrationContext::rewritePropertyAttribute(), clang::ento::PathDiagnosticCallPiece::setCallee(), clang::CodeGen::CGDebugInfo::setLocation(), clang::Rewriter::setSourceMgr(), clang::html::SyntaxHighlight(), and clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody().
Definition at line 1704 of file AnalysisBasedWarnings.cpp.
Referenced by clang::threadSafety::ThreadSafetyReporter::emitDiagnostics(), clang::threadSafety::ThreadSafetyReporter::handleExclusiveAndShared(), clang::threadSafety::ThreadSafetyReporter::handleFunExcludesLock(), clang::threadSafety::ThreadSafetyReporter::handleIncorrectUnlockKind(), clang::threadSafety::ThreadSafetyReporter::handleInvalidLockExp(), clang::threadSafety::ThreadSafetyReporter::handleMutexHeldEndOfScope(), clang::threadSafety::ThreadSafetyReporter::handleMutexNotHeld(), clang::threadSafety::ThreadSafetyReporter::handleNegativeNotHeld(), clang::threadSafety::ThreadSafetyReporter::handleNoMutexHeld(), and clang::Sema::MergeFunctionDecl().