Skip to content

Commit

Permalink
Fix warnings discovered by #87348 [-Wunused-but-set-variable]
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbaliasnikov authored and akiramenai committed Nov 13, 2024
1 parent 197fc64 commit 1cddc81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions clang/lib/AST/Interp/ByteCodeExprGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1255,6 +1255,7 @@ unsigned ByteCodeExprGen<Emitter>::allocateLocalPrimitive(DeclTy &&Src,
dyn_cast_if_present<ValueDecl>(Src.dyn_cast<const Decl *>())) {
assert(!P.getGlobal(VD));
assert(!Locals.contains(VD));
(void)VD;
}

// FIXME: There are cases where Src.is<Expr*>() is wrong, e.g.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ BasicBlock *llvm::SplitEdge(BasicBlock *BB, BasicBlock *Succ, DominatorTree *DT,
// If the successor only has a single pred, split the top of the successor
// block.
assert(SP == BB && "CFG broken");
SP = nullptr;
(void)SP;
return SplitBlock(Succ, &Succ->front(), DT, LI, MSSAU, BBName,
/*Before=*/true);
}
Expand Down

0 comments on commit 1cddc81

Please sign in to comment.