Clang 19 `-Wc++20-extensions` warning
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
- #2934 de @abhishekbelgaonkar23 — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp
- Área
- testing-qa
Línea de trabajo
Comienza con las definiciones de macros en catch2/catch_template_test_macros.hpp, catch2/internal/catch_template_test_registry.hpp y catch2/internal/catch_preprocessor.hpp. Reproduce la advertencia con el preset all-tests usando Clang 19.1.0 en el ejemplo de TEMPLATE_TEST_CASE reportado. La tarea estará terminada cuando la suite de pruebas se compile sin la advertencia -Wc++20-extensions.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
Clang reports a -Wc++20-extensions warning when expanding the TEMPLATE_TEST_CASE macro with the following message
/Users/thrasher/Projects/Catch2/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp:27:1: error: passing no argument for the '...' parameter of a variadic macro is a C++20 extension [-Werror,-Wc++20-extensions]
27 | TEMPLATE_TEST_CASE("type-shared ulpDistance tests", "[floating-point][ulp][approvals]", float, double) {
| ^
/Users/thrasher/Projects/Catch2/src/catch2/../catch2/catch_template_test_macros.hpp:76:39: note: expanded from macro 'TEMPLATE_TEST_CASE'
76 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE( __VA_ARGS__ )
| ^
/Users/thrasher/Projects/Catch2/src/catch2/../catch2/internal/catch_template_test_registry.hpp:104:9: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
104 | INTERNAL_CATCH_TEMPLATE_TEST_CASE_2( INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEMPLATE_TEST_ ), INTERNAL_CATCH_UNIQUE_NAME( CATCH2_INTERNAL_TEMPLATE_TEST_ ), Name, Tags, typename TestType, __VA_ARGS__ )
| ^
/Users/thrasher/Projects/Catch2/src/catch2/../catch2/internal/catch_template_test_registry.hpp:82:13: note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE_2'
82 | INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
| ^
/Users/thrasher/Projects/Catch2/src/catch2/../catch2/internal/catch_preprocessor.hpp:217:465: note: expanded from macro 'INTERNAL_CATCH_NTTP_GEN'
217 | #define INTERNAL_CATCH_NTTP_GEN(...) INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__),INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_0)
| ^
/Users/thrasher/Projects/Catch2/src/catch2/../catch2/internal/catch_preprocessor.hpp:100:9: note: macro 'INTERNAL_CATCH_VA_NARGS_IMPL' defined here
100 | #define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N
| ^
Reproduction steps
I'm using the all-tests preset with Clang 19 as provided by Homebrew. I also encounter this issue when consuming Catch2 via FetchContent for use in various other projects.
Platform information:
- OS: macOS 15
- Compiler+version: Clang 19.1.0
- Catch version: v3.7.1
fa43b77429ba76c462b1898d6cd2f2d7a9416b14
- Lenguaje dominante
- C++
- Estrellas
- 21.6k
- Forks
- 3.4k
- Merge medio
- 3 d 12 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de catchorg/Catch2
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 2 días
-
catch_discover_tests passes all EXTRA_ARGS as one argumentPosiblemente ocupada @CyberKun la tomó hace 11 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
catchorg/Catch2#3239 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Not seeing some error messages from fakeit in jetbrains riderPosiblemente ocupada @Amanpal9 la tomó hace 21 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
catchorg/Catch2#3228 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
catch_discover_tests fails for Emscripten/WASM tests since v3.16.0Posiblemente ocupada @nafiurahman00 la tomó hace 8 días. AbiertoExtras
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
catchorg/Catch2#3241 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
Todos los issues de catchorg/Catch2
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
cp-algorithms/cp-algorithms#1774 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
telefonicaid/fiware-orion#4836 ·
Los mantenedores suelen responder en 1 día
-
nixd exits at startup when its parent process belongs to another userPosiblemente ocupada @conao3 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nix-community/nixd#930 ·
Los mantenedores suelen responder en 2 días
-
refactor topic-ui topic-weather
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Command-Install Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
microsoft/winget-cli#6718 ·
Los mantenedores suelen responder en 2 días