From 1c5ac402b05a5a938817e65ffcb9a89ee62d8a8f Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 27 Nov 2024 08:54:27 +0100 Subject: [PATCH] [core] Fix compiler warning about missing return Commit 23bdb810d9 ("Optimize IsCopyConstructorDeleted") removed the fall-through return statement, leading compilers to complain that "control reaches end of non-void function". --- core/metacling/src/TClingCallFunc.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/metacling/src/TClingCallFunc.cxx b/core/metacling/src/TClingCallFunc.cxx index 3d76c8f7787ad..d44c31d9b57bf 100644 --- a/core/metacling/src/TClingCallFunc.cxx +++ b/core/metacling/src/TClingCallFunc.cxx @@ -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,