Skip to content

Commit d8ba8ec

Browse files
authored
[SYCLomatic] Fix coverity issue 0816 (#2252)
Signed-off-by: ChungHao Huang <[email protected]>
1 parent 678c546 commit d8ba8ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/DPCT/AsmMigration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2416,7 +2416,7 @@ class SYCLGen : public SYCLGenBase {
24162416
OS() << '(';
24172417
llvm::SaveAndRestore<const InlineAsmInstruction *> Save(CurrInst);
24182418
CurrInst = Inst;
2419-
for (auto [I, Op] : llvm::enumerate(Inst->input_operands())) {
2419+
for (const auto &[I, Op] : llvm::enumerate(Inst->input_operands())) {
24202420
if (emitStmt(Op))
24212421
return SYCLGenError();
24222422
if (I != Inst->getNumInputOperands() - 1)

0 commit comments

Comments
 (0)