clang 8.0.0

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/Basic/SourceManager.h"`
`#include "clang/CrossTU/CrossTranslationUnit.h"`
`#include "clang/Frontend/CompilerInstance.h"`
`#include "clang/Lex/Preprocessor.h"`
`#include "clang/StaticAnalyzer/Checkers/LocalCheckers.h"`
`#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"`
`#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"`
`#include "clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.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 "clang/StaticAnalyzer/Frontend/CheckerRegistration.h"`
`#include "llvm/ADT/PostOrderIterator.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"`
Include dependency graph for AnalysisConsumer.cpp:

Go to the source code of this file.

## Macros
#define | DEBUG_TYPE "AnalysisConsumer"
#define | ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN)
#define | ANALYSIS_STORE(NAME, CMDFLAG, DESC, CREATEFN) case NAME##Model: CreateStoreMgr = CREATEFN; break;
#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 | isBisonFile (ASTContext &C)

## 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.get(), PathConsumers, OutDir, PP); \
break;

## ◆ ANALYSIS_STORE

#define ANALYSIS_STORE | ( |  | NAME,
|  |  | CMDFLAG,
|  |  | DESC,
|  |  | CREATEFN
| ) |  | case NAME##Model: CreateStoreMgr = CREATEFN; break;

## ◆ DEBUG_TYPE

#define DEBUG_TYPE "AnalysisConsumer"

Definition at line 51 of file AnalysisConsumer.cpp.

## Function Documentation

## ◆ isBisonFile()

static bool isBisonFile | ( | ASTContext & | C | ) |
| static

Definition at line 520 of file AnalysisConsumer.cpp.

References clang::SourceManager::getBuffer(), clang::SourceManager::getMainFileID(), clang::ASTContext::getSourceManager(), and clang::ASTContext::getTranslationUnitDecl().

## ◆ shouldSkipFunction()

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

Definition at line 427 of file AnalysisConsumer.cpp.

References clang::CallGraph::addToCallGraph(), clang::CallGraphNode::getDecl(), clang::ObjCMethodDecl::getMethodFamily(), clang::ento::ExprEngine::Inline_Minimal, clang::ento::ExprEngine::Inline_Regular, and clang::OMF_init.

## ◆ STATISTIC() [1/6]

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

## ◆ STATISTIC() [2/6]

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

## ◆ STATISTIC() [3/6]

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

## ◆ STATISTIC() [4/6]

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

## ◆ STATISTIC() [5/6]

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

## ◆ STATISTIC() [6/6]

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