Conversation
|
I think it's an issue with clang 21. I was going to fix it too, but the warnings disappear with the latest release. |
|
clang 23: |
|
I'm just not sure how to update the clang. It's what comes on the MacOS 26.4.1 |
|
btw, I think I had a simpler solution: master...angt:llama.cpp:common-fix-jinja-warnings-with-clang-21 |
|
I consider this a bug in Clang, it makes no sense to set these to |
|
As I was told in #21333:
|
Yes, that's why I think the noreturn private method is the best way to "solve" the issue, so we can compile with clang 21 without warnings and without making the code awkward. |
|
@angt Could you open a PR with your change? I'll close this one. |
Overview
With clang 21.0.0 the jinja code generates the following warnings:
These are quite difficult to fix. It seems like the case of default implementation of a
virtualmethod throwing a "not implemented" exception was not considered compatible with-Wmissing-noreturn.The only semi-reasonable workaround that I found is this https://dev.to/martinlicht/-disables-code-when-clang-warns-about-unreachable-code-47ml. It's ugly, but it does the job.
Requirements