Skip to content

[clang] 21.1.0-rc2: compilation error due to misdetecting returning function as noreturn #151742

@BtbN

Description

@BtbN

I'm not sure since when it is happening, but it's a recent addition to some RC that got used in https://github.com/mstorsjo/llvm-mingw
I didn't have time to fully bisect a version.

The error is:

/50-vvenc/source/Lib/CommonLib/Buffer.cpp:740:1: error: function declared 'noreturn' should not return [-Werror,-Winvalid-noreturn]

Referring to the relevant source here:
https://github.com/fraunhoferhhi/vvenc/blob/master/source/Lib/CommonLib/Buffer.cpp#L740
https://github.com/fraunhoferhhi/vvenc/blob/master/source/Lib/CommonLib/Buffer.h#L177

There is nothing indicating that this function is supposed to be noreturn.

My build script is doing nothing special for vvenc either, so this should be reproducable by just building vvenc with an affected clang version.
I'm targetting win-on-aarch64 with my builds, in case it does not happen on other arches.

cc @mstorsjo

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerclang:frontendLanguage frontend issues, e.g. anything involving "Sema"false-positiveWarning fires when it should notregression:21

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions