diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-12-22 18:52:29 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-12-22 18:52:29 +0000 |
commit | 2ff5ab1516e48c2fff0138f953d887b5e695214b (patch) | |
tree | c52787595b6c148ca1a646c31f93e1eb764c362f /clang/lib/GR/Checker.cpp | |
parent | 8d602a8aa8e6697509465d8a5473fc41cb1a382e (diff) | |
download | bcm5719-llvm-2ff5ab1516e48c2fff0138f953d887b5e695214b.tar.gz bcm5719-llvm-2ff5ab1516e48c2fff0138f953d887b5e695214b.zip |
[analyzer] Refactoring: lib/Checker -> lib/GR and libclangChecker -> libclangGRCore
llvm-svn: 122421
Diffstat (limited to 'clang/lib/GR/Checker.cpp')
-rw-r--r-- | clang/lib/GR/Checker.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/clang/lib/GR/Checker.cpp b/clang/lib/GR/Checker.cpp new file mode 100644 index 00000000000..00976dbcedd --- /dev/null +++ b/clang/lib/GR/Checker.cpp @@ -0,0 +1,35 @@ +//== 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/GR/PathSensitive/Checker.h" +using namespace clang; + +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); + } +} |