clang 20.0.0git
Macros | Typedefs | Enumerations | Functions | Variables
CGExpr.cpp File Reference
#include "ABIInfoImpl.h"
#include "CGCUDARuntime.h"
#include "CGCXXABI.h"
#include "CGCall.h"
#include "CGCleanup.h"
#include "CGDebugInfo.h"
#include "CGObjCRuntime.h"
#include "CGOpenMPRuntime.h"
#include "CGRecordLayout.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "ConstantEmitter.h"
#include "TargetInfo.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/NSAPI.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsWebAssembly.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/MatrixBuilder.h"
#include "llvm/Passes/OptimizationLevel.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Support/xxhash.h"
#include "llvm/Transforms/Utils/SanitizerStats.h"
#include <optional>
#include <string>

Go to the source code of this file.

Macros

#define SANITIZER_CHECK(Enum, Name, Version)   {#Name, Version},
 

Typedefs

using RecIndicesTy = SmallVector< llvm::Value *, 8 >
 

Enumerations

enum  ConstantEmissionKind { CEK_None , CEK_AsReferenceOnly , CEK_AsValueOrReference , CEK_AsValueOnly }
 Can we constant-emit a load of a reference to a variable of the given type? This is different from predicates like Decl::mightBeUsableInConstantExpressions because we do want it to apply in situations that don't necessarily satisfy the language's rules for this (e.g. More...
 

Functions

static llvm::cl::opt< boolClSanitizeDebugDeoptimization ("ubsan-unique-traps", llvm::cl::Optional, llvm::cl::desc("Deoptimize traps for UBSAN so there is 1 trap per check."))
 
static llvm::cl::opt< boolClSanitizeGuardChecks ("ubsan-guard-checks", llvm::cl::Optional, llvm::cl::desc("Guard UBSAN checks with `llvm.allow.ubsan.check()`."))
 
static void pushTemporaryCleanup (CodeGenFunction &CGF, const MaterializeTemporaryExpr *M, const Expr *E, Address ReferenceTemporary)
 
static RawAddress createReferenceTemporary (CodeGenFunction &CGF, const MaterializeTemporaryExpr *M, const Expr *Inner, RawAddress *Alloca=nullptr)
 
static bool isAAPCS (const TargetInfo &TargetInfo)
 Helper method to check if the underlying ABI is AAPCS.
 
static llvm::ValueemitHashMix (CGBuilderTy &Builder, llvm::Value *Acc, llvm::Value *Ptr)
 
static llvm::ValuegetArrayIndexingBound (CodeGenFunction &CGF, const Expr *Base, QualType &IndexedType, LangOptions::StrictFlexArraysLevelKind StrictFlexArraysLevel)
 If Base is known to point to the start of an array, return the length of that array.
 
static bool getGEPIndicesToField (CodeGenFunction &CGF, const RecordDecl *RD, const FieldDecl *Field, RecIndicesTy &Indices)
 
static Address EmitPointerWithAlignment (const Expr *E, LValueBaseInfo *BaseInfo, TBAAAccessInfo *TBAAInfo, KnownNonNull_t IsKnownNonNull, CodeGenFunction &CGF)
 
static QualType getConstantExprReferredType (const FullExpr *E, const ASTContext &Ctx)
 
static bool isConstantEmittableObjectType (QualType type)
 Given an object of the given canonical type, can we safely copy a value out of it based on its initializer?
 
static ConstantEmissionKind checkVarTypeForConstantEmission (QualType type)
 
static DeclRefExprtryToConvertMemberExprToDeclRefExpr (CodeGenFunction &CGF, const MemberExpr *ME)
 
static bool hasBooleanRepresentation (QualType Ty)
 
static bool getRangeForType (CodeGenFunction &CGF, QualType Ty, llvm::APInt &Min, llvm::APInt &End, bool StrictEnums, bool IsBool)
 
static RawAddress MaybeConvertMatrixAddress (RawAddress Addr, CodeGenFunction &CGF, bool IsVector=true)
 
static void EmitStoreOfMatrixScalar (llvm::Value *value, LValue lvalue, bool isInit, CodeGenFunction &CGF)
 
static RValue EmitLoadOfMatrixLValue (LValue LV, SourceLocation Loc, CodeGenFunction &CGF)
 
static void setObjCGCLValueClass (const ASTContext &Ctx, const Expr *E, LValue &LV, bool IsMemberAccess=false)
 
static LValue EmitThreadPrivateVarDeclLValue (CodeGenFunction &CGF, const VarDecl *VD, QualType T, Address Addr, llvm::Type *RealVarTy, SourceLocation Loc)
 
static Address emitDeclTargetVarDeclLValue (CodeGenFunction &CGF, const VarDecl *VD, QualType T)
 
static LValue EmitGlobalVarDeclLValue (CodeGenFunction &CGF, const Expr *E, const VarDecl *VD)
 
static LValue EmitFunctionDeclLValue (CodeGenFunction &CGF, const Expr *E, GlobalDecl GD)
 
static LValue EmitCapturedFieldLValue (CodeGenFunction &CGF, const FieldDecl *FD, llvm::Value *ThisValue)
 
static LValue EmitGlobalNamedRegister (const VarDecl *VD, CodeGenModule &CGM)
 Named Registers are named metadata pointing to the register name which will be read from/written to as an argument to the intrinsic @llvm.read/write_register.
 
static bool canEmitSpuriousReferenceToVariable (CodeGenFunction &CGF, const DeclRefExpr *E, const VarDecl *VD)
 Determine whether we can emit a reference to VD from the current context, despite not necessarily having seen an odr-use of the variable in this context.
 
static CheckRecoverableKind getRecoverableKind (SanitizerMask Kind)
 
static void emitCheckHandlerCall (CodeGenFunction &CGF, llvm::FunctionType *FnType, ArrayRef< llvm::Value * > FnArgs, SanitizerHandler CheckHandler, CheckRecoverableKind RecoverKind, bool IsFatal, llvm::BasicBlock *ContBB)
 
static const ExprisSimpleArrayDecayOperand (const Expr *E)
 isSimpleArrayDecayOperand - If the specified expr is a simple decay from an array to pointer, return the array subexpression.
 
static llvm::ValueemitArraySubscriptGEP (CodeGenFunction &CGF, llvm::Type *elemType, llvm::Value *ptr, ArrayRef< llvm::Value * > indices, bool inbounds, bool signedIndices, SourceLocation loc, const llvm::Twine &name="arrayidx")
 
static Address emitArraySubscriptGEP (CodeGenFunction &CGF, Address addr, ArrayRef< llvm::Value * > indices, llvm::Type *elementType, bool inbounds, bool signedIndices, SourceLocation loc, CharUnits align, const llvm::Twine &name="arrayidx")
 
static CharUnits getArrayElementAlign (CharUnits arrayAlign, llvm::Value *idx, CharUnits eltSize)
 
static QualType getFixedSizeElementType (const ASTContext &ctx, const VariableArrayType *vla)
 
static bool hasBPFPreserveStaticOffset (const RecordDecl *D)
 
static bool hasBPFPreserveStaticOffset (const Expr *E)
 
static Address wrapWithBPFPreserveStaticOffset (CodeGenFunction &CGF, Address &Addr)
 
static bool IsPreserveAIArrayBase (CodeGenFunction &CGF, const Expr *ArrayBase)
 Given an array base, check whether its member access belongs to a record with preserve_access_index attribute or not.
 
static Address emitArraySubscriptGEP (CodeGenFunction &CGF, Address addr, ArrayRef< llvm::Value * > indices, QualType eltType, bool inbounds, bool signedIndices, SourceLocation loc, QualType *arrayType=nullptr, const Expr *Base=nullptr, const llvm::Twine &name="arrayidx")
 
static bool getFieldOffsetInBits (CodeGenFunction &CGF, const RecordDecl *RD, const FieldDecl *Field, int64_t &Offset)
 The offset of a field from the beginning of the record.
 
static std::optional< int64_t > getOffsetDifferenceInBits (CodeGenFunction &CGF, const FieldDecl *FD1, const FieldDecl *FD2)
 Returns the relative offset difference between FD1 and FD2.
 
static Address emitOMPArraySectionBase (CodeGenFunction &CGF, const Expr *Base, LValueBaseInfo &BaseInfo, TBAAAccessInfo &TBAAInfo, QualType BaseTy, QualType ElTy, bool IsLowerBound)
 
static Address emitAddrOfZeroSizeField (CodeGenFunction &CGF, Address Base, const FieldDecl *Field)
 Get the address of a zero-sized field within a record.
 
static Address emitAddrOfFieldStorage (CodeGenFunction &CGF, Address base, const FieldDecl *field)
 Drill down to the storage of a field without walking into reference types.
 
static Address emitPreserveStructAccess (CodeGenFunction &CGF, LValue base, Address addr, const FieldDecl *field)
 
static bool hasAnyVptr (const QualType Type, const ASTContext &Context)
 
static std::optional< LValue > EmitLValueOrThrowExpression (CodeGenFunction &CGF, const Expr *Operand)
 Emit the operand of a glvalue conditional operator.
 
static bool OnlyHasInlineBuiltinDeclaration (const FunctionDecl *FD)
 
static CGCallee EmitDirectCallee (CodeGenFunction &CGF, GlobalDecl GD)
 
static LValueOrRValue emitPseudoObjectExpr (CodeGenFunction &CGF, const PseudoObjectExpr *E, bool forLValue, AggValueSlot slot)
 

Variables

const SanitizerHandlerInfo SanitizerHandlers []
 

Macro Definition Documentation

◆ SANITIZER_CHECK

#define SANITIZER_CHECK (   Enum,
  Name,
  Version 
)    {#Name, Version},

Typedef Documentation

◆ RecIndicesTy

Definition at line 1071 of file CGExpr.cpp.

Enumeration Type Documentation

◆ ConstantEmissionKind

Can we constant-emit a load of a reference to a variable of the given type? This is different from predicates like Decl::mightBeUsableInConstantExpressions because we do want it to apply in situations that don't necessarily satisfy the language's rules for this (e.g.

C++'s ODR-use rules). For example, we want to able to do this with const float variables even if those variables aren't marked 'constexpr'.

Enumerator
CEK_None 
CEK_AsReferenceOnly 
CEK_AsValueOrReference 
CEK_AsValueOnly 

Definition at line 1704 of file CGExpr.cpp.

Function Documentation

◆ canEmitSpuriousReferenceToVariable()

static bool canEmitSpuriousReferenceToVariable ( CodeGenFunction CGF,
const DeclRefExpr E,
const VarDecl VD 
)
static

◆ checkVarTypeForConstantEmission()

static ConstantEmissionKind checkVarTypeForConstantEmission ( QualType  type)
static

◆ ClSanitizeDebugDeoptimization()

static llvm::cl::opt< bool > ClSanitizeDebugDeoptimization ( "ubsan-unique-traps"  ,
llvm::cl::Optional  ,
llvm::cl::desc("Deoptimize traps for UBSAN so there is 1 trap per check.")   
)
static

◆ ClSanitizeGuardChecks()

static llvm::cl::opt< bool > ClSanitizeGuardChecks ( "ubsan-guard-checks"  ,
llvm::cl::Optional  ,
llvm::cl::desc("Guard UBSAN checks with `llvm.allow.ubsan.check()`.")   
)
static

◆ createReferenceTemporary()

static RawAddress createReferenceTemporary ( CodeGenFunction CGF,
const MaterializeTemporaryExpr M,
const Expr Inner,
RawAddress Alloca = nullptr 
)
static

◆ emitAddrOfFieldStorage()

static Address emitAddrOfFieldStorage ( CodeGenFunction CGF,
Address  base,
const FieldDecl field 
)
static

◆ emitAddrOfZeroSizeField()

static Address emitAddrOfZeroSizeField ( CodeGenFunction CGF,
Address  Base,
const FieldDecl Field 
)
static

◆ emitArraySubscriptGEP() [1/3]

static Address emitArraySubscriptGEP ( CodeGenFunction CGF,
Address  addr,
ArrayRef< llvm::Value * >  indices,
llvm::Type elementType,
bool  inbounds,
bool  signedIndices,
SourceLocation  loc,
CharUnits  align,
const llvm::Twine &  name = "arrayidx" 
)
static

◆ emitArraySubscriptGEP() [2/3]

static Address emitArraySubscriptGEP ( CodeGenFunction CGF,
Address  addr,
ArrayRef< llvm::Value * >  indices,
QualType  eltType,
bool  inbounds,
bool  signedIndices,
SourceLocation  loc,
QualType arrayType = nullptr,
const Expr Base = nullptr,
const llvm::Twine &  name = "arrayidx" 
)
static

◆ emitArraySubscriptGEP() [3/3]

static llvm::Value * emitArraySubscriptGEP ( CodeGenFunction CGF,
llvm::Type elemType,
llvm::Value ptr,
ArrayRef< llvm::Value * >  indices,
bool  inbounds,
bool  signedIndices,
SourceLocation  loc,
const llvm::Twine &  name = "arrayidx" 
)
static

◆ EmitCapturedFieldLValue()

static LValue EmitCapturedFieldLValue ( CodeGenFunction CGF,
const FieldDecl FD,
llvm::Value ThisValue 
)
static

◆ emitCheckHandlerCall()

static void emitCheckHandlerCall ( CodeGenFunction CGF,
llvm::FunctionType *  FnType,
ArrayRef< llvm::Value * >  FnArgs,
SanitizerHandler  CheckHandler,
CheckRecoverableKind  RecoverKind,
bool  IsFatal,
llvm::BasicBlock *  ContBB 
)
static

◆ emitDeclTargetVarDeclLValue()

static Address emitDeclTargetVarDeclLValue ( CodeGenFunction CGF,
const VarDecl VD,
QualType  T 
)
static

◆ EmitDirectCallee()

static CGCallee EmitDirectCallee ( CodeGenFunction CGF,
GlobalDecl  GD 
)
static

◆ EmitFunctionDeclLValue()

static LValue EmitFunctionDeclLValue ( CodeGenFunction CGF,
const Expr E,
GlobalDecl  GD 
)
static

◆ EmitGlobalNamedRegister()

static LValue EmitGlobalNamedRegister ( const VarDecl VD,
CodeGenModule CGM 
)
static

Named Registers are named metadata pointing to the register name which will be read from/written to as an argument to the intrinsic @llvm.read/write_register.

So far, only the name is being passed down, but other options such as register type, allocation type or even optimization options could be passed down via the metadata node.

Definition at line 2911 of file CGExpr.cpp.

References clang::Asm, clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getDeclAlign(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::ValueDecl::getType(), and clang::CodeGen::LValue::MakeGlobalReg().

◆ EmitGlobalVarDeclLValue()

static LValue EmitGlobalVarDeclLValue ( CodeGenFunction CGF,
const Expr E,
const VarDecl VD 
)
static

◆ emitHashMix()

static llvm::Value * emitHashMix ( CGBuilderTy Builder,
llvm::Value Acc,
llvm::Value Ptr 
)
static

Definition at line 655 of file CGExpr.cpp.

◆ EmitLoadOfMatrixLValue()

static RValue EmitLoadOfMatrixLValue ( LValue  LV,
SourceLocation  Loc,
CodeGenFunction CGF 
)
static

◆ EmitLValueOrThrowExpression()

static std::optional< LValue > EmitLValueOrThrowExpression ( CodeGenFunction CGF,
const Expr Operand 
)
static

Emit the operand of a glvalue conditional operator.

This is either a glvalue or a (possibly-parenthesized) throw-expression. If this is a throw, no LValue is returned and the current block has been terminated.

Definition at line 5044 of file CGExpr.cpp.

References clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), and clang::CodeGen::CodeGenFunction::EmitLValue().

◆ emitOMPArraySectionBase()

static Address emitOMPArraySectionBase ( CodeGenFunction CGF,
const Expr Base,
LValueBaseInfo BaseInfo,
TBAAAccessInfo TBAAInfo,
QualType  BaseTy,
QualType  ElTy,
bool  IsLowerBound 
)
static

◆ EmitPointerWithAlignment()

static Address EmitPointerWithAlignment ( const Expr E,
LValueBaseInfo BaseInfo,
TBAAAccessInfo TBAAInfo,
KnownNonNull_t  IsKnownNonNull,
CodeGenFunction CGF 
)
static

Definition at line 1257 of file CGExpr.cpp.

References clang::CodeGen::CodeGenFunction::authPointerToPointerCast(), clang::CodeGen::CodeGenFunction::Builder, clang::Call, clang::CodeGen::CodeGenFunction::CFITCK_UnrelatedCast, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), clang::CodeGen::Decl, E, clang::CodeGen::CodeGenFunction::EmitArrayToPointerDecay(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitVTablePtrCheckForCast(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::GetAddressOfBaseClass(), clang::CodeGen::LValueBaseInfo::getAlignmentSource(), clang::Type::getAs(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::CodeGenModule::getNaturalPointeeTypeAlignment(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), clang::CodeGen::LValue::getTBAAInfo(), clang::Expr::getType(), clang::CodeGen::Address::getType(), clang::SanitizerSet::has(), clang::Expr::IgnoreParens(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), clang::CodeGen::CodeGenFunction::makeNaturalAddressForPointer(), clang::CodeGen::LValueBaseInfo::mergeForCast(), clang::CodeGen::CodeGenModule::mergeTBAAInfoForCast(), clang::CodeGen::CodeGenFunction::SanOpts, clang::CodeGen::Address::setAlignment(), clang::CodeGen::CodeGenFunction::ShouldNullCheckClassCastValue(), and clang::CodeGen::Address::withElementType().

◆ emitPreserveStructAccess()

static Address emitPreserveStructAccess ( CodeGenFunction CGF,
LValue  base,
Address  addr,
const FieldDecl field 
)
static

◆ emitPseudoObjectExpr()

static LValueOrRValue emitPseudoObjectExpr ( CodeGenFunction CGF,
const PseudoObjectExpr E,
bool  forLValue,
AggValueSlot  slot 
)
static

◆ EmitStoreOfMatrixScalar()

static void EmitStoreOfMatrixScalar ( llvm::Value value,
LValue  lvalue,
bool  isInit,
CodeGenFunction CGF 
)
static

◆ EmitThreadPrivateVarDeclLValue()

static LValue EmitThreadPrivateVarDeclLValue ( CodeGenFunction CGF,
const VarDecl VD,
QualType  T,
Address  Addr,
llvm::Type RealVarTy,
SourceLocation  Loc 
)
static

◆ getArrayElementAlign()

static CharUnits getArrayElementAlign ( CharUnits  arrayAlign,
llvm::Value idx,
CharUnits  eltSize 
)
static

◆ getArrayIndexingBound()

static llvm::Value * getArrayIndexingBound ( CodeGenFunction CGF,
const Expr Base,
QualType IndexedType,
LangOptions::StrictFlexArraysLevelKind  StrictFlexArraysLevel 
)
static

◆ getConstantExprReferredType()

static QualType getConstantExprReferredType ( const FullExpr E,
const ASTContext Ctx 
)
static

◆ getFieldOffsetInBits()

static bool getFieldOffsetInBits ( CodeGenFunction CGF,
const RecordDecl RD,
const FieldDecl Field,
int64_t &  Offset 
)
static

◆ getFixedSizeElementType()

static QualType getFixedSizeElementType ( const ASTContext ctx,
const VariableArrayType vla 
)
static

◆ getGEPIndicesToField()

static bool getGEPIndicesToField ( CodeGenFunction CGF,
const RecordDecl RD,
const FieldDecl Field,
RecIndicesTy Indices 
)
static

◆ getOffsetDifferenceInBits()

static std::optional< int64_t > getOffsetDifferenceInBits ( CodeGenFunction CGF,
const FieldDecl FD1,
const FieldDecl FD2 
)
static

Returns the relative offset difference between FD1 and FD2.

offsetof(struct foo, FD1) - offsetof(struct foo, FD2)
#define offsetof(t, d)

Both fields must be within the same struct.

Definition at line 4143 of file CGExpr.cpp.

References getFieldOffsetInBits(), clang::DeclContext::getOuterLexicalRecordContext(), and clang::FieldDecl::getParent().

◆ getRangeForType()

static bool getRangeForType ( CodeGenFunction CGF,
QualType  Ty,
llvm::APInt &  Min,
llvm::APInt &  End,
bool  StrictEnums,
bool  IsBool 
)
static

◆ getRecoverableKind()

static CheckRecoverableKind getRecoverableKind ( SanitizerMask  Kind)
static

Definition at line 3453 of file CGExpr.cpp.

◆ hasAnyVptr()

static bool hasAnyVptr ( const QualType  Type,
const ASTContext Context 
)
static

Definition at line 4792 of file CGExpr.cpp.

References clang::RecordDecl::fields(), clang::Type::getAsCXXRecordDecl(), and hasAnyVptr().

Referenced by hasAnyVptr().

◆ hasBooleanRepresentation()

static bool hasBooleanRepresentation ( QualType  Ty)
static

◆ hasBPFPreserveStaticOffset() [1/2]

static bool hasBPFPreserveStaticOffset ( const Expr E)
static

◆ hasBPFPreserveStaticOffset() [2/2]

static bool hasBPFPreserveStaticOffset ( const RecordDecl D)
static

Definition at line 3998 of file CGExpr.cpp.

References D, and clang::Decl::hasAttr().

Referenced by emitArraySubscriptGEP(), and hasBPFPreserveStaticOffset().

◆ isAAPCS()

static bool isAAPCS ( const TargetInfo TargetInfo)
static

Helper method to check if the underlying ABI is AAPCS.

Definition at line 449 of file CGExpr.cpp.

References clang::TargetInfo::getABI().

◆ isConstantEmittableObjectType()

static bool isConstantEmittableObjectType ( QualType  type)
static

Given an object of the given canonical type, can we safely copy a value out of it based on its initializer?

Definition at line 1679 of file CGExpr.cpp.

References clang::Qualifiers::hasConst(), clang::Qualifiers::hasVolatile(), and clang::ast_matchers::type.

Referenced by checkVarTypeForConstantEmission().

◆ IsPreserveAIArrayBase()

static bool IsPreserveAIArrayBase ( CodeGenFunction CGF,
const Expr ArrayBase 
)
static

Given an array base, check whether its member access belongs to a record with preserve_access_index attribute or not.

Definition at line 4027 of file CGExpr.cpp.

References E, clang::CodeGen::CodeGenFunction::getDebugInfo(), clang::MemberExpr::getMemberDecl(), clang::PointerType::getPointeeType(), clang::Type::getUnqualifiedDesugaredType(), clang::Decl::hasAttr(), clang::Type::hasAttr(), and clang::Expr::IgnoreImpCasts().

Referenced by emitArraySubscriptGEP().

◆ isSimpleArrayDecayOperand()

static const Expr * isSimpleArrayDecayOperand ( const Expr E)
static

isSimpleArrayDecayOperand - If the specified expr is a simple decay from an array to pointer, return the array subexpression.

Definition at line 3928 of file CGExpr.cpp.

References E, clang::FullExpr::getSubExpr(), clang::Expr::getType(), and clang::Type::isVariableArrayType().

◆ MaybeConvertMatrixAddress()

static RawAddress MaybeConvertMatrixAddress ( RawAddress  Addr,
CodeGenFunction CGF,
bool  IsVector = true 
)
static

◆ OnlyHasInlineBuiltinDeclaration()

static bool OnlyHasInlineBuiltinDeclaration ( const FunctionDecl FD)
static

Definition at line 5491 of file CGExpr.cpp.

References clang::Redeclarable< decl_type >::getPreviousDecl().

Referenced by EmitDirectCallee().

◆ pushTemporaryCleanup()

static void pushTemporaryCleanup ( CodeGenFunction CGF,
const MaterializeTemporaryExpr M,
const Expr E,
Address  ReferenceTemporary 
)
static

◆ setObjCGCLValueClass()

static void setObjCGCLValueClass ( const ASTContext Ctx,
const Expr E,
LValue &  LV,
bool  IsMemberAccess = false 
)
static

◆ tryToConvertMemberExprToDeclRefExpr()

static DeclRefExpr * tryToConvertMemberExprToDeclRefExpr ( CodeGenFunction CGF,
const MemberExpr ME 
)
static

◆ wrapWithBPFPreserveStaticOffset()

static Address wrapWithBPFPreserveStaticOffset ( CodeGenFunction CGF,
Address Addr 
)
static

Variable Documentation

◆ SanitizerHandlers

const SanitizerHandlerInfo SanitizerHandlers[]
Initial value:
= {
#define SANITIZER_CHECK(Enum, Name, Version)
}
#define LIST_SANITIZER_CHECKS

Definition at line 3470 of file CGExpr.cpp.

Referenced by emitCheckHandlerCall().