diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-02-14 22:54:53 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-02-14 22:54:53 +0000 |
commit | a3fadfcce5911742801a302cac82d4fe54d5c682 (patch) | |
tree | a8e1b13fed26cc3cf5d4bc8c87ae0356110e19b6 | |
parent | 546bded9ba9676e7ddae45b9ab8e1e08c6660db7 (diff) |
When visualizing ExplodedNodes created by GRExprEngine, color nodes with
null-dereferences or bad control-flow red.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47140 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Analysis/GRExprEngine.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Analysis/GRExprEngine.cpp b/Analysis/GRExprEngine.cpp index 4418afddb6..15f1aa2e37 100644 --- a/Analysis/GRExprEngine.cpp +++ b/Analysis/GRExprEngine.cpp @@ -1114,7 +1114,16 @@ struct VISIBILITY_HIDDEN DOTGraphTraits<GRExprEngine::NodeTy*> : Out << (*J)->toString(); } } - } + } + + 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; |