clang
6.0.0
lib
Analysis
ProgramPoint.cpp
Go to the documentation of this file.
1
//==- ProgramPoint.cpp - Program Points for Path-Sensitive Analysis -*- 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 the interface ProgramPoint, which identifies a
11
// distinct location in a function.
12
//
13
//===----------------------------------------------------------------------===//
14
15
#include "
clang/Analysis/ProgramPoint.h
"
16
17
using namespace
clang
;
18
19
ProgramPointTag::~ProgramPointTag
() {}
20
21
ProgramPoint
ProgramPoint::getProgramPoint
(
const
Stmt
*S,
ProgramPoint::Kind
K,
22
const
LocationContext
*LC,
23
const
ProgramPointTag
*tag){
24
switch
(K) {
25
default
:
26
llvm_unreachable(
"Unhandled ProgramPoint kind"
);
27
case
ProgramPoint::PreStmtKind
:
28
return
PreStmt
(S, LC, tag);
29
case
ProgramPoint::PostStmtKind
:
30
return
PostStmt
(S, LC, tag);
31
case
ProgramPoint::PreLoadKind
:
32
return
PreLoad
(S, LC, tag);
33
case
ProgramPoint::PostLoadKind
:
34
return
PostLoad
(S, LC, tag);
35
case
ProgramPoint::PreStoreKind
:
36
return
PreStore
(S, LC, tag);
37
case
ProgramPoint::PostLValueKind
:
38
return
PostLValue
(S, LC, tag);
39
case
ProgramPoint::PostStmtPurgeDeadSymbolsKind
:
40
return
PostStmtPurgeDeadSymbols
(S, LC, tag);
41
case
ProgramPoint::PreStmtPurgeDeadSymbolsKind
:
42
return
PreStmtPurgeDeadSymbols
(S, LC, tag);
43
}
44
}
45
46
SimpleProgramPointTag::SimpleProgramPointTag
(StringRef MsgProvider,
47
StringRef Msg)
48
: Desc((MsgProvider +
" : "
+ Msg).str()) {}
49
50
StringRef
SimpleProgramPointTag::getTagDescription
()
const
{
51
return
Desc;
52
}
clang::ProgramPoint::PreStmtPurgeDeadSymbolsKind
Definition:
ProgramPoint.h:67
clang::ProgramPoint::Kind
Kind
Definition:
ProgramPoint.h:63
clang::ProgramPoint::PostLValueKind
Definition:
ProgramPoint.h:75
clang::Stmt
Stmt - This represents one statement.
Definition:
Stmt.h:66
clang::PreStmtPurgeDeadSymbols
Represents a point after we ran remove dead bindings BEFORE processing the given statement.
Definition:
ProgramPoint.h:442
clang::LocationContext
Definition:
AnalysisDeclContext.h:215
clang::PostLValue
Definition:
ProgramPoint.h:426
clang::PostLoad
Definition:
ProgramPoint.h:385
clang::ProgramPoint::PreStmtKind
Definition:
ProgramPoint.h:66
clang::ProgramPoint::getProgramPoint
static ProgramPoint getProgramPoint(const Stmt *S, ProgramPoint::Kind K, const LocationContext *LC, const ProgramPointTag *tag)
Definition:
ProgramPoint.cpp:21
clang::SimpleProgramPointTag::SimpleProgramPointTag
SimpleProgramPointTag(StringRef MsgProvider, StringRef Msg)
Definition:
ProgramPoint.cpp:46
clang::SimpleProgramPointTag::getTagDescription
StringRef getTagDescription() const override
Definition:
ProgramPoint.cpp:50
clang::PreStore
Definition:
ProgramPoint.h:371
clang::PostStmtPurgeDeadSymbols
Represents a point after we ran remove dead bindings AFTER processing the given statement.
Definition:
ProgramPoint.h:458
clang::PreLoad
Definition:
ProgramPoint.h:357
ProgramPoint.h
clang::ProgramPoint::PostStmtKind
Definition:
ProgramPoint.h:69
clang::ProgramPoint::PreStoreKind
Definition:
ProgramPoint.h:72
clang::ProgramPoint::PostStmtPurgeDeadSymbolsKind
Definition:
ProgramPoint.h:68
clang::PreStmt
Definition:
ProgramPoint.h:287
clang::ProgramPointTag
ProgramPoints can be "tagged" as representing points specific to a given analysis entity...
Definition:
ProgramPoint.h:40
clang
Dataflow Directional Tag Classes.
Definition:
CFGReachabilityAnalysis.h:22
clang::ProgramPoint
Definition:
ProgramPoint.h:61
clang::PostStmt
Definition:
ProgramPoint.h:303
clang::ProgramPoint::PostLoadKind
Definition:
ProgramPoint.h:71
clang::ProgramPointTag::~ProgramPointTag
virtual ~ProgramPointTag()
Definition:
ProgramPoint.cpp:19
clang::ProgramPoint::PreLoadKind
Definition:
ProgramPoint.h:70
Generated on Thu Feb 8 2018 09:14:08 for clang by
1.8.13