diff options
-rw-r--r-- | include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h b/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h index e1e15620fa..33943d9f1c 100644 --- a/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h +++ b/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h @@ -87,8 +87,18 @@ public: return 0; } + /// Get the percentage of the reachable blocks. + unsigned getPercentBlocksReachable(const Decl *D) { + MapTy::const_iterator I = Map.find(D); + if (I != Map.end()) + return ((I->second->VisitedBasicBlocks.count() * 100) / + I->second->TotalBasicBlocks); + return 0; + } + unsigned getTotalNumBasicBlocks(); unsigned getTotalNumVisitedBasicBlocks(); + }; }} // end clang ento namespaces |