Skip to content

Commit

Permalink
[core] Fix compiler warning about missing return
Browse files Browse the repository at this point in the history
Commit 23bdb81 ("Optimize IsCopyConstructorDeleted") removed the
fall-through return statement, leading compilers to complain that
"control reaches end of non-void function".
  • Loading branch information
hahnjo committed Nov 27, 2024
1 parent 5b49a0f commit 1c5ac40
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/metacling/src/TClingCallFunc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ static bool IsCopyConstructorDeleted(QualType QT)
}

assert(0 && "did not find a copy constructor?");
// Should never happen and the return value is somewhat arbitrary, but we did not see a deleted copy ctor. The user
// will be told if the generated code doesn't compile.
return false;
}

void TClingCallFunc::make_narg_ctor(const unsigned N, ostringstream &typedefbuf,
Expand Down

0 comments on commit 1c5ac40

Please sign in to comment.