summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-01 01:16:08 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-03-01 01:16:08 +0000
commit0036b19abda0fa1881d705abb19f39d123c4b713 (patch)
tree6ec039d4a4bb13f92e1830de52e5f113f69d1d09 /clang/lib/StaticAnalyzer/Core/CheckerContext.cpp
parentd66580790136fc87432b089d342af06e10f6df44 (diff)
downloadbcm5719-llvm-0036b19abda0fa1881d705abb19f39d123c4b713.tar.gz
bcm5719-llvm-0036b19abda0fa1881d705abb19f39d123c4b713.zip
[analyzer] Remove Checker V1.
llvm-svn: 126725
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/CheckerContext.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/CheckerContext.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp b/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp
new file mode 100644
index 00000000000..f6fb8f256c0
--- /dev/null
+++ b/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp
@@ -0,0 +1,33 @@
+//== CheckerContext.cpp - Context info for path-sensitive checkers-----------=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines CheckerContext that provides contextual info for
+// path-sensitive checkers.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h"
+using namespace clang;
+using namespace ento;
+
+CheckerContext::~CheckerContext() {
+ // Do we need to autotransition? 'Dst' can get populated in a variety of
+ // ways, including 'addTransition()' adding the predecessor node to Dst
+ // without actually generated a new node. We also shouldn't autotransition
+ // if we are building sinks or we generated a node and decided to not
+ // add it as a transition.
+ if (Dst.size() == size && !B.BuildSinks && !B.hasGeneratedNode) {
+ if (ST && ST != B.GetState(Pred)) {
+ static int autoTransitionTag = 0;
+ addTransition(ST, &autoTransitionTag);
+ }
+ else
+ Dst.Add(Pred);
+ }
+}
OpenPOWER on IntegriCloud