Skip to content

Compiler warning for clang 21.1.4 #9

@hksdpc255

Description

@hksdpc255

Every time I compile llama.cpp for testing, Clang emits three warnings:

In file included from /home/builduser/llama.cpp/common/../vendor/minja/chat-template.hpp:11:
/home/builduser/llama.cpp/common/../vendor/minja/minja.hpp:956:10: warning: function 'do_render' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
  956 |     void do_render(std::ostringstream &, const std::shared_ptr<Context> &) const override {
      |          ^
/home/builduser/llama.cpp/common/../vendor/minja/minja.hpp:1234:11: warning: function 'do_evaluate' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
 1234 |     Value do_evaluate(const std::shared_ptr<Context> &) const override {
      |           ^
/home/builduser/llama.cpp/common/../vendor/minja/minja.hpp:2736:84: warning: function 'operator()' could be declared with attribute 'noreturn' [-Wmissing-noreturn]
 2736 |   globals.set("raise_exception", simple_function("raise_exception", { "message" }, [](const std::shared_ptr<Context> &, Value & args) -> Value {
      |                                                                                    ^
3 warnings generated.

I’m wondering if any of the CI target platforms enable -Werror, which could potentially break the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions