\version "2.22.1"
{
\clef tenor
\repeat volta 2 {
c'1
\clef bass
c'1
}
\alternative {
{
c'1
\set Staff.clefGlyph = "clefs.C"
}
{ c'1 }
}
c'1
}
While this is technically perfect, I'd strongly advise against doing it
this way: It's a recipe for disaster regarding the start of the 2nd
alternative. Half of your cellists (or whatever instrument uses tenor
and bass clef here) is going to play a g' here, because there's this
tenor clef directly in front of the the note, separated only by the bar
line (which is what you're used to in any clef change).
One could do something like
\version "2.22.1"
{
\clef tenor
\repeat volta 2 {
c'1
\clef bass
c'1
}
\alternative {
{
c'1
\set Staff.clefGlyph = "clefs.C"
\once \override Score.BarLine.stencil =
#(lambda (grob)
(grob-interpret-markup
grob
#{
\markup {
\stencil #(ly:bar-line::print grob)
\hspace #0.5
\fontsize #-2 \raise #1 \musicglyph "clefs.F"
} #}))
}
{ c'1 }
}
c'1
}
(note that this is very unpolished; a real solution would have to check
if there's a line break at the repeat sign)
but usually it's much better to just change notation such that there is
no clef change at the repeat sign at all.
Lukas