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 | 5b70a22656e764542b8604c17fdbb40f2fd285ed (patch) | |
| tree | 9d07638e4206ad5c2840cc1aeaf6ceadd275c85f | |
| parent | 5d8bab7ecd079607dc49e40134aa891345d37fa3 (diff) | |
| download | bcm5719-llvm-5b70a22656e764542b8604c17fdbb40f2fd285ed.tar.gz bcm5719-llvm-5b70a22656e764542b8604c17fdbb40f2fd285ed.zip | |
When visualizing ExplodedNodes created by GRExprEngine, color nodes with
null-dereferences or bad control-flow red.
llvm-svn: 47140
| -rw-r--r-- | clang/Analysis/GRExprEngine.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/Analysis/GRExprEngine.cpp b/clang/Analysis/GRExprEngine.cpp index 4418afddb6c..15f1aa2e373 100644 --- a/clang/Analysis/GRExprEngine.cpp +++ b/clang/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; |

