[analyzer] Refactoring: Move stuff into namespace 'GR'.
[clang.git] / lib / GR / Checker.cpp
blob521d9e2b7db1df8468d18b4dd068172377a4bc5b
1 //== Checker.h - Abstract interface for checkers -----------------*- C++ -*--=//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines Checker and CheckerVisitor, classes used for creating
11 // domain-specific checks.
13 //===----------------------------------------------------------------------===//
15 #include "clang/GR/PathSensitive/Checker.h"
16 using namespace clang;
17 using namespace GR;
19 Checker::~Checker() {}
21 CheckerContext::~CheckerContext() {
22 // Do we need to autotransition? 'Dst' can get populated in a variety of
23 // ways, including 'addTransition()' adding the predecessor node to Dst
24 // without actually generated a new node. We also shouldn't autotransition
25 // if we are building sinks or we generated a node and decided to not
26 // add it as a transition.
27 if (Dst.size() == size && !B.BuildSinks && !B.HasGeneratedNode) {
28 if (ST && ST != B.GetState(Pred)) {
29 static int autoTransitionTag = 0;
30 B.Tag = &autoTransitionTag;
31 addTransition(ST);
33 else
34 Dst.Add(Pred);