When visualizing ExplodedNodes created by GRExprEngine, color nodes with

null-dereferences or bad control-flow red.

llvm-svn: 47140
This commit is contained in:
Ted Kremenek 2008-02-14 22:54:53 +00:00
parent 5d8bab7ecd
commit 5b70a22656
1 changed files with 10 additions and 1 deletions

View File

@ -1116,6 +1116,15 @@ struct VISIBILITY_HIDDEN DOTGraphTraits<GRExprEngine::NodeTy*> :
}
}
static std::string getNodeAttributes(const GRExprEngine::NodeTy* N, void*) {
if (GraphPrintCheckerState->isImplicitNullDeref(N) ||
GraphPrintCheckerState->isExplicitNullDeref(N))
return "color=\"red\",style=\"filled\"";
return "";
}
static std::string getNodeLabel(const GRExprEngine::NodeTy* N, void*) {
std::ostringstream Out;