opnsense-src/lib/Checker/Checker.cpp

36 lines
1.2 KiB
C++
Raw Normal View History

2009-12-01 06:08:04 -05:00
//== 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.
//
//===----------------------------------------------------------------------===//
2010-02-16 04:31:36 -05:00
#include "clang/Checker/PathSensitive/Checker.h"
2009-12-01 06:08:04 -05:00
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) {
2009-12-15 13:49:47 -05:00
if (ST && ST != B.GetState(Pred)) {
2009-12-01 06:08:04 -05:00
static int autoTransitionTag = 0;
B.Tag = &autoTransitionTag;
2009-12-15 13:49:47 -05:00
addTransition(ST);
2009-12-01 06:08:04 -05:00
}
else
Dst.Add(Pred);
}
}