clang
3.9.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
llvm.src
tools
clang
include
clang
StaticAnalyzer
Core
PathSensitive
TaintManager.h
Go to the documentation of this file.
1
//== TaintManager.h - Managing taint --------------------------- -*- 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 provides APIs for adding, removing, querying symbol taint.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_TAINTMANAGER_H
15
#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_TAINTMANAGER_H
16
17
#include "
clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
"
18
#include "
clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
"
19
#include "
clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h
"
20
#include "
clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h
"
21
#include "llvm/ADT/ImmutableMap.h"
22
23
namespace
clang {
24
namespace
ento {
25
26
/// The GDM component containing the tainted root symbols. We lazily infer the
27
/// taint of the dependent symbols. Currently, this is a map from a symbol to
28
/// tag kind. TODO: Should support multiple tag kinds.
29
// FIXME: This does not use the nice trait macros because it must be accessible
30
// from multiple translation units.
31
struct
TaintMap
{};
32
typedef
llvm::ImmutableMap<SymbolRef, TaintTagType>
TaintMapImpl
;
33
template
<>
struct
ProgramStateTrait
<
TaintMap
>
34
:
public
ProgramStatePartialTrait
<TaintMapImpl> {
35
static
void
*
GDMIndex
() {
static
int
index = 0;
return
&index; }
36
};
37
38
class
TaintManager
{
39
40
TaintManager
() {}
41
};
42
43
}
44
}
45
46
#endif
clang::ento::ProgramStateTrait
Definition:
ProgramState.h:54
clang::ento::ProgramStatePartialTrait
Definition:
ProgramState.h:52
ProgramState.h
PathDiagnostic.h
clang::ento::TaintMapImpl
llvm::ImmutableMap< SymbolRef, TaintTagType > TaintMapImpl
Definition:
TaintManager.h:32
TaintTag.h
llvm::ImmutableMap
Definition:
ProgramStateTrait.h:25
clang::ento::ProgramStateTrait< TaintMap >::GDMIndex
static void * GDMIndex()
Definition:
TaintManager.h:35
clang::ento::TaintMap
The GDM component containing the tainted root symbols.
Definition:
TaintManager.h:31
clang::ento::TaintManager
Definition:
TaintManager.h:38
ProgramStateTrait.h
Generated on Wed Aug 31 2016 16:58:18 for clang by
1.8.6