clang  6.0.0svn
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 
16 
17 using namespace clang;
18 
20 
22  const LocationContext *LC,
23  const ProgramPointTag *tag){
24  switch (K) {
25  default:
26  llvm_unreachable("Unhandled ProgramPoint kind");
28  return PreStmt(S, LC, tag);
30  return PostStmt(S, LC, tag);
32  return PreLoad(S, LC, tag);
34  return PostLoad(S, LC, tag);
36  return PreStore(S, LC, tag);
38  return PostLValue(S, LC, tag);
40  return PostStmtPurgeDeadSymbols(S, LC, tag);
42  return PreStmtPurgeDeadSymbols(S, LC, tag);
43  }
44 }
45 
47  StringRef Msg)
48  : Desc((MsgProvider + " : " + Msg).str()) {}
49 
51  return Desc;
52 }
Stmt - This represents one statement.
Definition: Stmt.h:60
Represents a point after we ran remove dead bindings BEFORE processing the given statement.
Definition: ProgramPoint.h:442
static ProgramPoint getProgramPoint(const Stmt *S, ProgramPoint::Kind K, const LocationContext *LC, const ProgramPointTag *tag)
SimpleProgramPointTag(StringRef MsgProvider, StringRef Msg)
StringRef getTagDescription() const override
Represents a point after we ran remove dead bindings AFTER processing the given statement.
Definition: ProgramPoint.h:458
ProgramPoints can be "tagged" as representing points specific to a given analysis entity...
Definition: ProgramPoint.h:40
Dataflow Directional Tag Classes.