Issue 140203
Summary [Clang] -Wmissing-constinit triggers when the suggested change causes compilation error
Labels clang
Assignees
Reporter horenmar
    I have a header that declares a `constinit const` array, and a cpp file that initializes it with `constexpr` (because I want to be able to use it in further constexpr functions in that cpp file).

This triggers `-Wmissing-constinit` pointed at the initializing declaration, together with a suggestion to add `constinit` to the declaration. However, doing so leads to a compilation error, because `constexpr` and `constinit` cannot be combined on a single declaration.

[CE link](https://godbolt.org/z/4r4Y9G9db).

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to