[cfe-commits] r47140 - /cfe/trunk/Analysis/GRExprEngine.cpp
Ted Kremenek
kremenek at apple.com
Thu Feb 14 14:54:53 PST 2008
Author: kremenek
Date: Thu Feb 14 16:54:53 2008
New Revision: 47140
URL: http://llvm.org/viewvc/llvm-project?rev=47140&view=rev
Log:
When visualizing ExplodedNodes created by GRExprEngine, color nodes with
null-dereferences or bad control-flow red.
Modified:
cfe/trunk/Analysis/GRExprEngine.cpp
Modified: cfe/trunk/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/GRExprEngine.cpp?rev=47140&r1=47139&r2=47140&view=diff
==============================================================================
--- cfe/trunk/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/Analysis/GRExprEngine.cpp Thu Feb 14 16:54:53 2008
@@ -1114,7 +1114,16 @@
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;
More information about the cfe-commits
mailing list