clang API Documentation

Classes | Public Member Functions | Friends
clang::threadSafety::SExprBuilder Class Reference

#include <ThreadSafetyCommon.h>

List of all members.

Classes

struct  BlockInfo
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.
CapabilityExpr translateAttrExpr (const Expr *AttrExp, CallingContext *Ctx)
 Translate a clang expression in an attribute to a til::SExpr.
til::SExprtranslate (const Stmt *S, CallingContext *Ctx)
til::SCFGbuildCFG (CFGWalker &Walker)
til::SExprlookupStmt (const Stmt *S)
til::BasicBlocklookupBlock (const CFGBlock *B)
const til::SCFGgetCFG () const
til::SCFGgetCFG ()

Friends

class CFGWalker

Detailed Description

Definition at line 306 of file ThreadSafetyCommon.h.


Constructor & Destructor Documentation


Member Function Documentation

Definition at line 86 of file ThreadSafetyCommon.cpp.

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

Definition at line 358 of file ThreadSafetyCommon.h.

Definition at line 359 of file ThreadSafetyCommon.h.

Definition at line 354 of file ThreadSafetyCommon.h.

References clang::CFGBlock::getBlockID().

Definition at line 78 of file ThreadSafetyCommon.cpp.

Referenced by translate().

Definition at line 213 of file ThreadSafetyCommon.cpp.

References clang::Stmt::getStmtClass(), and lookupStmt().

Referenced by translateAttrExpr().

CapabilityExpr clang::threadSafety::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:
AttrExpThe expression to translate.
DThe declaration to which the attribute is attached.
DeclExpAn expression involving the Decl to which the attribute is attached. E.g. the call to a function.

Definition at line 106 of file ThreadSafetyCommon.cpp.

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

Referenced by clang::threadSafety::ThreadSafetyAnalyzer::getMutexIDs().

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

Definition at line 164 of file ThreadSafetyCommon.cpp.

References clang::threadSafety::til::CAST_objToPtr, translate(), and clang::UO_LNot.


Friends And Related Function Documentation

friend class CFGWalker [friend]

Definition at line 431 of file ThreadSafetyCommon.h.


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