clang 20.0.0git
Macros | Functions
AnalysisConsumer.cpp File Reference
#include "clang/StaticAnalyzer/Frontend/AnalysisConsumer.h"
#include "ModelInjector.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Analysis/Analyses/LiveVariables.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/CallGraph.h"
#include "clang/Analysis/CodeInjector.h"
#include "clang/Analysis/MacroExpansionContext.h"
#include "clang/Analysis/PathDiagnostic.h"
#include "clang/Basic/SourceManager.h"
#include "clang/CrossTU/CrossTranslationUnit.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/CheckerManager.h"
#include "clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h"
#include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
#include <queue>
#include <utility>
#include "clang/StaticAnalyzer/Core/Analyses.def"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "AnalysisConsumer"
 
#define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN)
 
#define ANALYSIS_CONSTRAINTS(NAME, CMDFLAG, DESC, CREATEFN)    case NAME##Model: CreateConstraintMgr = CREATEFN; break;
 

Functions

 STATISTIC (NumFunctionTopLevel, "The # of functions at top level.")
 
 STATISTIC (NumFunctionsAnalyzed, "The # of functions and blocks analyzed (as top level " "with inlining turned on).")
 
 STATISTIC (NumBlocksInAnalyzedFunctions, "The # of basic blocks in the analyzed functions.")
 
 STATISTIC (NumVisitedBlocksInAnalyzedFunctions, "The # of visited basic blocks in the analyzed functions.")
 
 STATISTIC (PercentReachableBlocks, "The % of reachable basic blocks.")
 
 STATISTIC (MaxCFGSize, "The maximum number of basic blocks in a function.")
 
static bool shouldSkipFunction (const Decl *D, const SetOfConstDecls &Visited, const SetOfConstDecls &VisitedAsTopLevel)
 
static bool fileContainsString (StringRef Substring, ASTContext &C)
 
static void reportAnalyzerFunctionMisuse (const AnalyzerOptions &Opts, const ASTContext &Ctx)
 

Macro Definition Documentation

◆ ANALYSIS_CONSTRAINTS

#define ANALYSIS_CONSTRAINTS (   NAME,
  CMDFLAG,
  DESC,
  CREATEFN 
)     case NAME##Model: CreateConstraintMgr = CREATEFN; break;

◆ ANALYSIS_DIAGNOSTICS

#define ANALYSIS_DIAGNOSTICS (   NAME,
  CMDFLAG,
  DESC,
  CREATEFN 
)
Value:
case PD_##NAME: \
CREATEFN(Opts.getDiagOpts(), PathConsumers, OutDir, PP, CTU, \
MacroExpansions); \
break;

◆ DEBUG_TYPE

#define DEBUG_TYPE   "AnalysisConsumer"

Definition at line 51 of file AnalysisConsumer.cpp.

Function Documentation

◆ fileContainsString()

static bool fileContainsString ( StringRef  Substring,
ASTContext C 
)
static

Definition at line 499 of file AnalysisConsumer.cpp.

References clang::C, and SM.

◆ reportAnalyzerFunctionMisuse()

static void reportAnalyzerFunctionMisuse ( const AnalyzerOptions Opts,
const ASTContext Ctx 
)
static

◆ shouldSkipFunction()

static bool shouldSkipFunction ( const Decl D,
const SetOfConstDecls Visited,
const SetOfConstDecls VisitedAsTopLevel 
)
static

Definition at line 389 of file AnalysisConsumer.cpp.

References D, and Visited.

◆ STATISTIC() [1/6]

STATISTIC ( MaxCFGSize  ,
"The maximum number of basic blocks in a function."   
)

◆ STATISTIC() [2/6]

STATISTIC ( NumBlocksInAnalyzedFunctions  ,
"The # of basic blocks in the analyzed functions."   
)

◆ STATISTIC() [3/6]

STATISTIC ( NumFunctionsAnalyzed  ,
"The # of functions and blocks analyzed (as top level " "with inlining turned on)."   
)

◆ STATISTIC() [4/6]

STATISTIC ( NumFunctionTopLevel  ,
"The # of functions at top level."   
)

◆ STATISTIC() [5/6]

STATISTIC ( NumVisitedBlocksInAnalyzedFunctions  ,
"The # of visited basic blocks in the analyzed functions."   
)

◆ STATISTIC() [6/6]

STATISTIC ( PercentReachableBlocks  ,
"The % of reachable basic blocks."   
)