summaryrefslogtreecommitdiffstats
path: root/clang/lib/EntoSA/Checker.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-12-23 07:22:02 +0000
committerTed Kremenek <kremenek@apple.com>2010-12-23 07:22:02 +0000
commitef33f0996c6a625767690395f3cfb41afb84db5a (patch)
treee7d0e6ec23cdcb950b06d65a125b150aba35c7f0 /clang/lib/EntoSA/Checker.cpp
parent98857c986078c6e6a10910628dbabf75ae735b76 (diff)
downloadbcm5719-llvm-ef33f0996c6a625767690395f3cfb41afb84db5a.tar.gz
bcm5719-llvm-ef33f0996c6a625767690395f3cfb41afb84db5a.zip
Rename headers: 'clang/GR' 'clang/EntoSA' and
update Makefile. llvm-svn: 122493
Diffstat (limited to 'clang/lib/EntoSA/Checker.cpp')
-rw-r--r--clang/lib/EntoSA/Checker.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/clang/lib/EntoSA/Checker.cpp b/clang/lib/EntoSA/Checker.cpp
new file mode 100644
index 00000000000..943be6b9313
--- /dev/null
+++ b/clang/lib/EntoSA/Checker.cpp
@@ -0,0 +1,36 @@
+//== Checker.h - Abstract interface for checkers -----------------*- C++ -*--=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines Checker and CheckerVisitor, classes used for creating
+// domain-specific checks.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/EntoSA/PathSensitive/Checker.h"
+using namespace clang;
+using namespace ento;
+
+Checker::~Checker() {}
+
+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;
+ B.Tag = &autoTransitionTag;
+ addTransition(ST);
+ }
+ else
+ Dst.Add(Pred);
+ }
+}
OpenPOWER on IntegriCloud