blob: 29fb3bc18624a8807fba439b6018bf0a145e3af3 (
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
36
37
38
|
//==- GRAuditor.h - Observers of the creation of ExplodedNodes------*- 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 GRAuditor and its primary subclasses, an interface
// to audit the creation of ExplodedNodes. This interface can be used
// to implement simple checkers that do not mutate analysis state but
// instead operate by perfoming simple logical checks at key monitoring
// locations (e.g., function calls).
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_ANALYSIS_GRAUDITOR
#define LLVM_CLANG_ANALYSIS_GRAUDITOR
#include "clang/AST/Expr.h"
#include "clang/Analysis/PathSensitive/ExplodedGraph.h"
namespace clang {
template <typename STATE>
class GRAuditor {
public:
typedef ExplodedNode<STATE> NodeTy;
virtual ~GRAuditor() {}
virtual bool Audit(NodeTy* N) = 0;
};
} // end clang namespace
#endif
|