8000 Fixed building with Clang 20.1 (#398) by bkryza · Pull Request #403 · bkryza/clang-uml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixed building with Clang 20.1 (#398) #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2025
8000
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
8000
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,14 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
${CUSTOM_COMPILE_OPTIONS}
-Wno-missing-template-arg-list-after-template-kw)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 20)
set(CMAKE_CXX_STANDARD 20)
set(CUSTOM_COMPILE_OPTIONS ${CUSTOM_COMPILE_OPTIONS}
-DFMT_USE_CONSTEXPR=0
-DFMT_USE_CONSTEVAL=0
-Wno-invalid-constexpr
-Wno-deprecated-anon-enum-enum-conversion)
endif()
endif()

link_directories(${LLVM_LIBRARY_DIR})
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![macos build status](https://github.com/bkryza/clang-uml/actions/workflows/macos.yml/badge.svg)](https://github.com/bkryza/clang-uml/actions)
[![Coverage](https://codecov.io/gh/bkryza/clang-uml/branch/master/graph/badge.svg)](https://codecov.io/gh/bkryza/clang-uml)
[![Version](https://img.shields.io/badge/version-0.6.1-blue)](https://github.com/bkryza/clang-uml/releases)
[![Version](https://img.shields.io/badge/LLVM-12,13,14,15,16,17,18,19-orange)](https://github.com/bkryza/clang-uml/releases)
[![Version](https://img.shields.io/badge/LLVM-12,13,14,15,16,17,18,19,20-orange)](https://github.com/bkryza/clang-uml/releases)
[![Doxygen](https://img.shields.io/badge/Docs-Doxygen-gainsboro)](https://clang-uml.github.io)

`clang-uml` is an automatic C++ to UML class, sequence, package and include diagram generator, driven by
Expand Down
4 changes: 4 additions & 0 deletions cmake/LLVMSetup.cmake
Original file line number Diff line number Diff line change
Expa 8000 nd Up @@ -30,6 +30,10 @@ if(LLVM_VERSION STREQUAL "19")
set(LLVM_VERSION "19.1")
endif()

if(LLVM_VERSION STREQUAL "20")
set(LLVM_VERSION "20.1")
endif()

find_package(LLVM ${LLVM_VERSION} CONFIG REQUIRED)

list(APPEND CMAKE_MODULE_PATH ${LLVM_CMAKE_DIR})
Expand Down
8 changes: 8 additions & 0 deletions thirdparty/spdlog/fmt/bundled/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@
# define FMT_UNICODE !FMT_MSC_VERSION
#endif

#if !defined(FMT_USE_CONSTEVAL)
#define FMT_USE_CONSTEVAL 1
#endif

#if FMT_USE_CONSTEVAL
#ifndef FMT_CONSTEVAL
# if ((FMT_GCC_VERSION >= 1000 || FMT_CLANG_VERSION >= 1101) && \
(!defined(__apple_build_version__) || \
Expand All @@ -236,6 +241,9 @@
# define FMT_CONSTEVAL
# endif
#endif
#else
#define FMT_CONSTEVAL
#endif

#ifndef FMT_USE_NONTYPE_TEMPLATE_ARGS
# if defined(__cpp_nontype_template_args) && \
Expand Down
5 changes: 4 additions & 1 deletion util/test_llvm_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ declare -a llvm_configs=("llvm-config-12"
"llvm-config-16"
"llvm-config-17"
"llvm-config-18"
"llvm-config-19")
"llvm-config-19"
"llvm-config-20")

# Test with GCC and different LLVM versions
for config_path in ${llvm_configs[@]}; do
Expand All @@ -29,3 +30,5 @@ CC=/usr/bin/clang-18 CXX=/usr/bin/clang++-18 LLVM_VERSION=18 NUMPROC=16 CMAKE_GE
make clean
CC=/usr/bin/clang-19 CXX=/usr/bin/clang++-19 LLVM_VERSION=19 NUMPROC=16 CMAKE_GENERATOR=Ninja ENABLE_CXX_MODULES_TEST_CASES=ON ENABLE_CUDA_TEST_CASES=ON make test
make clean
CC=/usr/bin/clang-20 CXX=/usr/bin/clang++-20 LLVM_VERSION=20 NUMPROC=16 CMAKE_GENERATOR=Ninja ENABLE_CXX_MODULES_TEST_CASES=ON ENABLE_CUDA_TEST_CASES=ON make test
make clean
Loading
0