clang
3.7.0
|
#include <ThreadSafetyCommon.h>
Classes | |
struct | CallingContext |
Encapsulates the lexical context of a function call. The lexical context includes the arguments to the call, including the implicit object argument. When an attribute containing a mutex expression is attached to a method, the expression may refer to formal parameters of the method. Actual arguments must be substituted for formal parameters to derive the appropriate mutex expression in the lexical context where the function is called. PrevCtx holds the context in which the arguments themselves should be evaluated; multiple calling contexts can be chained together by the lock_returned attribute. 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. Constructs the context from D, DeclExp, and SelfDecl. 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 |
Definition at line 313 of file ThreadSafetyCommon.h.
|
inline |
Definition at line 338 of file ThreadSafetyCommon.h.
References clang::threadSafety::til::Variable::setKind(), and clang::threadSafety::til::Variable::VK_SFun.
Definition at line 78 of file ThreadSafetyCommon.cpp.
References clang::threadSafety::CFGWalker::walk().
|
inline |
Definition at line 365 of file ThreadSafetyCommon.h.
|
inline |
Definition at line 366 of file ThreadSafetyCommon.h.
|
inline |
Definition at line 361 of file ThreadSafetyCommon.h.
References clang::CFGBlock::getBlockID().
til::SExpr * SExprBuilder::lookupStmt | ( | const Stmt * | S | ) |
Definition at line 70 of file ThreadSafetyCommon.cpp.
Referenced by translate().
til::SExpr * SExprBuilder::translate | ( | const Stmt * | S, |
CallingContext * | Ctx | ||
) |
Definition at line 203 of file ThreadSafetyCommon.cpp.
References lookupStmt().
Referenced by translateAttrExpr().
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.
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::getLocation(), clang::ValueDecl::getType(), isCalleeArrow(), clang::threadSafety::SExprBuilder::CallingContext::NumArgs, clang::threadSafety::SExprBuilder::CallingContext::SelfArg, clang::threadSafety::SExprBuilder::CallingContext::SelfArrow, and clang::VK_LValue.
CapabilityExpr SExprBuilder::translateAttrExpr | ( | const Expr * | AttrExp, |
CallingContext * | Ctx | ||
) |
Translate a clang expression in an attribute to a til::SExpr.
Definition at line 154 of file ThreadSafetyCommon.cpp.
References clang::threadSafety::til::CAST_objToPtr, translate(), and clang::UO_LNot.
|
friend |
Definition at line 438 of file ThreadSafetyCommon.h.