From b66cab49233d3a54538bdbeb2def1e908c5af54c Mon Sep 17 00:00:00 2001 From: "petro.zarytskyi" Date: Wed, 13 Mar 2024 01:52:27 +0200 Subject: [PATCH] Replace noLoc with fakeLoc to silence the clang assertion --- lib/Differentiator/VisitorBase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Differentiator/VisitorBase.cpp b/lib/Differentiator/VisitorBase.cpp index 1c05c2645..cb7d1726b 100644 --- a/lib/Differentiator/VisitorBase.cpp +++ b/lib/Differentiator/VisitorBase.cpp @@ -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>