class AtomicExpr

Declaration

class AtomicExpr : public Expr { /* full declaration omitted */ };

Description

AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic .h>, and corresponding __opencl_atomic_* for OpenCL 2.0. All of these instructions take one primary pointer, at least one memory order. The instructions for which getScopeModel returns non-null value take one synch scope.

Declared at: clang/include/clang/AST/Expr.h:6234

Inherits from: Expr

Member Variables

private clang::Stmt* [7] SubExprs
private unsigned int NumSubExprs
private clang::SourceLocation BuiltinLoc
private clang::SourceLocation RParenLoc
private clang::AtomicExpr::AtomicOp Op

Inherited from Stmt:

protected

Method Overview

  • public AtomicExpr(clang::Stmt::EmptyShell Empty)
  • public AtomicExpr(clang::SourceLocation BLoc, ArrayRef<clang::Expr *> args, clang::QualType t, clang::AtomicExpr::AtomicOp op, clang::SourceLocation RP)
  • public clang::Stmt::child_range children()
  • public clang::Stmt::const_child_range children() const
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getBuiltinLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public unsigned int getNumSubExprs() const
  • public static unsigned int getNumSubExprs(clang::AtomicExpr::AtomicOp Op)
  • public clang::AtomicExpr::AtomicOp getOp() const
  • public clang::Expr * getOrder() const
  • public clang::Expr * getOrderFail() const
  • public clang::Expr * getPtr() const
  • public clang::SourceLocation getRParenLoc() const
  • public clang::Expr * getScope() const
  • public static std::unique_ptr<AtomicScopeModel> getScopeModel(clang::AtomicExpr::AtomicOp Op)
  • public std::unique_ptr<AtomicScopeModel> getScopeModel() const
  • public const clang::Expr *const * getSubExprs() const
  • public clang::Expr ** getSubExprs()
  • public clang::Expr * getVal1() const
  • public clang::Expr * getVal2() const
  • public clang::QualType getValueType() const
  • public clang::Expr * getWeak() const
  • public bool isCmpXChg() const
  • public bool isOpenCL() const
  • public bool isVolatile() const

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

AtomicExpr(clang::Stmt::EmptyShell Empty)

Description

Build an empty AtomicExpr.

Declared at: clang/include/clang/AST/Expr.h:6264

Parameters

clang::Stmt::EmptyShell Empty

AtomicExpr(clang::SourceLocation BLoc,
           ArrayRef<clang::Expr*> args,
           clang::QualType t,
           clang::AtomicExpr::AtomicOp op,
           clang::SourceLocation RP)

Declared at: clang/include/clang/AST/Expr.h:6256

Parameters

clang::SourceLocation BLoc
ArrayRef<clang::Expr*> args
clang::QualType t
clang::AtomicExpr::AtomicOp op
clang::SourceLocation RP

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/Expr.h:6337

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Expr.h:6340

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/Expr.h:6332

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:6329

clang::SourceLocation getBuiltinLoc() const

Declared at: clang/include/clang/AST/Expr.h:6326

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:6330

unsigned int getNumSubExprs() const

Declared at: clang/include/clang/AST/Expr.h:6299

static unsigned int getNumSubExprs(
    clang::AtomicExpr::AtomicOp Op)

Description

Determine the number of arguments the specified atomic builtin should have.

Declared at: clang/include/clang/AST/Expr.h:6261

Parameters

clang::AtomicExpr::AtomicOp Op

clang::AtomicExpr::AtomicOp getOp() const

Declared at: clang/include/clang/AST/Expr.h:6298

clang::Expr* getOrder() const

Declared at: clang/include/clang/AST/Expr.h:6269

clang::Expr* getOrderFail() const

Declared at: clang/include/clang/AST/Expr.h:6282

clang::Expr* getPtr() const

Declared at: clang/include/clang/AST/Expr.h:6266

clang::SourceLocation getRParenLoc() const

Declared at: clang/include/clang/AST/Expr.h:6327

clang::Expr* getScope() const

Declared at: clang/include/clang/AST/Expr.h:6272

static std::unique_ptr<AtomicScopeModel>
getScopeModel(clang::AtomicExpr::AtomicOp Op)

Description

Get atomic scope model for the atomic op code.

Declared at: clang/include/clang/AST/Expr.h:6347

Parameters

clang::AtomicExpr::AtomicOp Op

Returns

empty atomic scope model if the atomic op code does not have scope operand.

std::unique_ptr<AtomicScopeModel> getScopeModel()
    const

Description

Get atomic scope model.

Declared at: clang/include/clang/AST/Expr.h:6360

Returns

empty atomic scope model if this atomic expression does not have scope operand.

const clang::Expr* const* getSubExprs() const

Declared at: clang/include/clang/AST/Expr.h:6302

clang::Expr** getSubExprs()

Declared at: clang/include/clang/AST/Expr.h:6301

clang::Expr* getVal1() const

Declared at: clang/include/clang/AST/Expr.h:6276

clang::Expr* getVal2() const

Declared at: clang/include/clang/AST/Expr.h:6286

clang::QualType getValueType() const

Declared at: clang/include/clang/AST/Expr.h:6296

clang::Expr* getWeak() const

Declared at: clang/include/clang/AST/Expr.h:6292

bool isCmpXChg() const

Declared at: clang/include/clang/AST/Expr.h:6310

bool isOpenCL() const

Declared at: clang/include/clang/AST/Expr.h:6321

bool isVolatile() const

Declared at: clang/include/clang/AST/Expr.h:6306