clang 22.0.0git
|
#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) | |
til::LiteralPtr * | createThisPlaceholder () |
CapabilityExpr | translateAttrExpr (const Expr *AttrExp, const NamedDecl *D, const Expr *DeclExp, til::SExpr *Self=nullptr) |
Translate a clang expression in an attribute to a til::SExpr. | |
CapabilityExpr | translateAttrExpr (const Expr *AttrExp, CallingContext *Ctx) |
Translate a clang expression in an attribute to a til::SExpr. | |
til::SExpr * | translateVariable (const VarDecl *VD, CallingContext *Ctx) |
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 () |
void | setLookupLocalVarExpr (std::function< const Expr *(const NamedDecl *)> F) |
Friends | |
class | CFGWalker |
Definition at line 350 of file ThreadSafetyCommon.h.
|
inline |
Definition at line 384 of file ThreadSafetyCommon.h.
References clang::threadSafety::til::Variable::VK_SFun.
Definition at line 106 of file ThreadSafetyCommon.cpp.
References CFGWalker, and clang::threadSafety::CFGWalker::walk().
Referenced by clang::threadSafety::printSCFG().
|
inline |
Definition at line 391 of file ThreadSafetyCommon.h.
|
inline |
Definition at line 419 of file ThreadSafetyCommon.h.
|
inline |
Definition at line 418 of file ThreadSafetyCommon.h.
|
inline |
Definition at line 414 of file ThreadSafetyCommon.h.
References clang::CFGBlock::getBlockID().
til::SExpr * SExprBuilder::lookupStmt | ( | const Stmt * | S | ) |
Definition at line 104 of file ThreadSafetyCommon.cpp.
Referenced by translate().
|
inline |
Definition at line 421 of file ThreadSafetyCommon.h.
References std::function.
til::SExpr * SExprBuilder::translate | ( | const Stmt * | S, |
CallingContext * | Ctx ) |
Definition at line 279 of file ThreadSafetyCommon.cpp.
References clang::cast(), clang::Stmt::getStmtClass(), lookupStmt(), and translate().
Referenced by translate(), translateAttrExpr(), and translateVariable().
CapabilityExpr SExprBuilder::translateAttrExpr | ( | const Expr * | AttrExp, |
CallingContext * | Ctx ) |
Translate a clang expression in an attribute to a til::SExpr.
Definition at line 198 of file ThreadSafetyCommon.cpp.
References clang::threadSafety::til::CAST_objToPtr, clang::Expr::getType(), clang::Expr::IgnoreImplicit(), clang::isa(), and translate().
CapabilityExpr SExprBuilder::translateAttrExpr | ( | const Expr * | AttrExp, |
const NamedDecl * | D, | ||
const Expr * | DeclExp, | ||
til::SExpr * | Self = nullptr ) |
Translate a clang expression in an attribute to a til::SExpr.
Constructs the context from D, DeclExp, and SelfDecl.
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. |
Self | S-expression to substitute for a CXXThisExpr in a call, or argument to a cleanup function. |
Definition at line 125 of file ThreadSafetyCommon.cpp.
References clang::cast(), clang::threadSafety::SExprBuilder::CallingContext::FunArgs, clang::isa(), isCalleeArrow(), clang::threadSafety::SExprBuilder::CallingContext::NumArgs, clang::Self, clang::threadSafety::SExprBuilder::CallingContext::SelfArg, clang::threadSafety::SExprBuilder::CallingContext::SelfArrow, and translateAttrExpr().
Referenced by translateAttrExpr().
til::SExpr * SExprBuilder::translateVariable | ( | const VarDecl * | VD, |
CallingContext * | Ctx ) |
Definition at line 243 of file ThreadSafetyCommon.cpp.
References clang::VarDecl::getCanonicalDecl(), clang::ValueDecl::getType(), clang::isa(), clang::VarDecl::isStaticLocal(), clang::Result, and translate().
|
friend |
Definition at line 427 of file ThreadSafetyCommon.h.
References clang::C, and CFGWalker.
Referenced by buildCFG(), and CFGWalker.