clang 8.0.0

Classes | Public Member Functions | Friends | List of all members
clang::threadSafety::SExprBuilder Class Reference

`#include "clang/Analysis/Analyses/ThreadSafetyCommon.h"`

## Classes
struct | CallingContext
| Encapsulates the lexical context of a function call. More...

## Public Member Functions
| SExprBuilder (til::MemRegionRef A)
CapabilityExpr | translateAttrExpr (const Expr *AttrExp, const NamedDecl *D, const Expr *DeclExp, VarDecl *SelfD=nullptr)
| Translate a clang expression in an attribute to a til::SExpr. More...
CapabilityExpr | translateAttrExpr (const Expr *AttrExp, CallingContext *Ctx)
| Translate a clang expression in an attribute to a til::SExpr. More...
til::SExpr * | translate (const Stmt *S, CallingContext *Ctx)
til::SCFG * | buildCFG (CFGWalker &Walker)
til::SExpr * | lookupStmt (const Stmt *S)
til::BasicBlock * | lookupBlock (const CFGBlock *B)
const til::SCFG * | getCFG () const
til::SCFG * | getCFG ()

## Friends
class | CFGWalker

## Detailed Description

Definition at line 330 of file ThreadSafetyCommon.h.

## Constructor & Destructor Documentation

## ◆ SExprBuilder()

clang::threadSafety::SExprBuilder::SExprBuilder | ( | til::MemRegionRef | A | ) |
| inline

Definition at line 364 of file ThreadSafetyCommon.h.

## Member Function Documentation

## ◆ buildCFG()

til::SCFG * SExprBuilder::buildCFG | ( | CFGWalker & | Walker | ) |

Definition at line 79 of file ThreadSafetyCommon.cpp.

References clang::threadSafety::CFGWalker::walk().

## ◆ getCFG() [1/2]

const til::SCFG* clang::threadSafety::SExprBuilder::getCFG | ( |  | ) | const
| inline

Definition at line 389 of file ThreadSafetyCommon.h.

## ◆ getCFG() [2/2]

til::SCFG* clang::threadSafety::SExprBuilder::getCFG | ( |  | ) |
| inline

Definition at line 390 of file ThreadSafetyCommon.h.

## ◆ lookupBlock()

til::BasicBlock* clang::threadSafety::SExprBuilder::lookupBlock | ( | const CFGBlock * | B | ) |
| inline

Definition at line 385 of file ThreadSafetyCommon.h.

References clang::CFGBlock::getBlockID().

## ◆ lookupStmt()

til::SExpr * SExprBuilder::lookupStmt | ( | const Stmt * | S | ) |

Definition at line 72 of file ThreadSafetyCommon.cpp.

## ◆ translate()

til::SExpr * SExprBuilder::translate | ( | const Stmt * | S,
|  | CallingContext * | Ctx
| ) |  |

Definition at line 199 of file ThreadSafetyCommon.cpp.

## ◆ translateAttrExpr() [1/2]

CapabilityExpr SExprBuilder::translateAttrExpr | ( | const Expr * | AttrExp,
|  | const NamedDecl * | D,
|  | const Expr * | DeclExp,
|  | VarDecl * | SelfDecl = `nullptr`
| ) |  |

Translate a clang expression in an attribute to a til::SExpr.

Constructs the context from D, DeclExp, and SelfDecl.

Parameters

  AttrExp | The expression to translate.
  D | The declaration to which the attribute is attached.
  DeclExp | An expression involving the Decl to which the attribute is attached. E.g. the call to a function.

Definition at line 96 of file ThreadSafetyCommon.cpp.

References clang::threadSafety::SExprBuilder::CallingContext::FunArgs, clang::Decl::getASTContext(), clang::Decl::getLocation(), clang::ValueDecl::getType(), isCalleeArrow(), clang::threadSafety::SExprBuilder::CallingContext::NumArgs, clang::threadSafety::SExprBuilder::CallingContext::SelfArg, clang::threadSafety::SExprBuilder::CallingContext::SelfArrow, and clang::VK_LValue.

## ◆ translateAttrExpr() [2/2]

CapabilityExpr SExprBuilder::translateAttrExpr | ( | const Expr * | AttrExp,
|  | CallingContext * | Ctx
| ) |  |

Translate a clang expression in an attribute to a til::SExpr.

Definition at line 152 of file ThreadSafetyCommon.cpp.

## Friends And Related Function Documentation

## ◆ CFGWalker

friend class CFGWalker
| friend

Definition at line 394 of file ThreadSafetyCommon.h.

The documentation for this class was generated from the following files:

- include/clang/Analysis/Analyses/ThreadSafetyCommon.h
- lib/Analysis/ThreadSafetyCommon.cpp