Skip to content

Commit

Permalink
Try workarounding clang static analyzer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zentrik committed Jan 21, 2025
1 parent c5266cb commit 2252e89
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cgutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ static Constant *literal_pointer_val_slot(jl_codectx_t &ctx, jl_value_t *p)
if (addr->smalltag) {
// some common builtin datatypes have a special pool for accessing them by smalltag id
Constant *tag = ConstantInt::get(getInt32Ty(ctx.builder.getContext()), addr->smalltag << 4);
[[clang::suppress]] // Workaround https://github.com/llvm/llvm-project/issues/119415
Constant *smallp = ConstantExpr::getInBoundsGetElementPtr(getInt8Ty(ctx.builder.getContext()), prepare_global_in(jl_Module, jl_small_typeof_var), tag);
auto ty = ctx.types().T_ppjlvalue;
if (ty->getPointerAddressSpace() == smallp->getType()->getPointerAddressSpace())
Expand Down

0 comments on commit 2252e89

Please sign in to comment.