Issue 184154
Summary static_assert(llvm::is_sorted_constexpr(...)) fails with std::initializer_list
Labels new issue
Assignees
Reporter Rayfxl
    ### Describe the bug

When using `static_assert(llvm::is_sorted_constexpr(SupportedOp))` where `SupportedOp` is a `constexpr static std::initializer_list<unsigned>`, compilation fails with:
`error: static_assert _expression_ is not an integral constant _expression_`

This happens when I run `cmake --build . --target check-mlir`, and my cmake command is 
`cmake -G Ninja ../llvm -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_EXAMPLES=OFF -DLLVM_TARGETS_TO_BUILD="host;NVPTX" -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON -DLLVM_CCACHE_BUILD=ON -DMLIR_INCLUDE_INTEGRATION_TESTS=ON -DLLVM_USE_SPLIT_DWARF=ON`

Replacing std::initializer_list with std::array works as expected.

Is this an existing issue? Or anyone also encountered this problem?

<img width="1322" height="535" alt="Image" src="" />
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to