summaryrefslogtreecommitdiffstats
path: root/lib/Analysis/Checker.cpp
blob: 0d907e501686b9fa33ef3136137bf31aabdbd002 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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/Analysis/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 (state && state != B.GetState(Pred)) {
      static int autoTransitionTag = 0;
      B.Tag = &autoTransitionTag;
      addTransition(state);
    }
    else
      Dst.Add(Pred);
  }
}
OpenPOWER on IntegriCloud