Skip to content
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

TEMPLATE_TEST_CASE triggers -Wunused-template with clang 8 #1762

Closed
aza-ableton opened this issue Oct 2, 2019 · 0 comments
Closed

TEMPLATE_TEST_CASE triggers -Wunused-template with clang 8 #1762

aza-ableton opened this issue Oct 2, 2019 · 0 comments

Comments

@aza-ableton
Copy link

The -Wunused-template warning is triggered by the expansion of the TEMPLATE_TEST_CASE macro. This prevents enabling that warning in client code.

Expected behavior
TEMPLATE_TEST_CASE tests compile without warnings when -Wunused-template is enabled in client code.

Reproduction steps
Compile the following with clang 8 or later using -Weverything -Wno-c++98-compat or just -Wunused-template:

// ignore all warnings in Catch internal code
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Weverything"
#include "catch.hpp"
#pragma clang diagnostic pop

TEMPLATE_TEST_CASE("T", "[]", int)
{
}

Platform information:
I have seen this on OS X Mojave using XCode 10.2.1, but it seems to occur on other platforms as well and with later clang versions. See https://godbolt.org/z/wO8_HD

JoeyGrajciar added a commit that referenced this issue Oct 18, 2019
this warning was introduced by rework to support NTTPs
since we have implementation macro for NTTPs and normal template test cases
warning is going to be suppressed

Fixes #1762
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant