Skip to content

Commit

Permalink
Replace noLoc with fakeLoc to silence the clang assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
PetroZarytskyi committed Mar 12, 2024
1 parent b813c44 commit b66cab4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Differentiator/VisitorBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ namespace clad {
CastKind CK = m_Sema.PrepareScalarCast(Zero, T);
return m_Sema.ImpCastExprToType(Zero.get(), T, CK).get();
}
return m_Sema.ActOnInitList(noLoc, {}, noLoc).get();
SourceLocation fakeLoc = utils::GetValidSLoc(m_Sema);
return m_Sema.ActOnInitList(fakeLoc, {}, fakeLoc).get();
}

std::pair<const clang::Expr*, llvm::SmallVector<const clang::Expr*, 4>>
Expand Down

0 comments on commit b66cab4

Please sign in to comment.