-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
TYPED_TEST_SUITE - Must specify at least one argument for '...' parameter of variadic macro #2271
Comments
I have to refer to the previous comment #2069 (comment) |
Ping? |
Hi! I've got exactly the same problem now. In the referred issue you wrote it was eventually fixed. Can we expect another patch for that? |
Any update on this? @gennadiycivil |
…generation of type- and type-parametrized tests Clang issues such a warning for TYPED_TEST_SUITE: must specify at least one argument for '...' parameter of variadic macro Until now code hasn't been standard conforming (though since C++20 it will be), read: https://en.cppreference.com/w/cpp/preprocessor/replace
When warnings provide no value turning them off is a great solution. |
Updates the third party module of the Google Test framework. With it goes the necessity to add an empty item at the list of some test instantiations and thus also some NOLINT are removed. For TYPED_TEST_SUITE the problem remains (google/googletest#2271).
Basically the same issue was fixed in the past: #2063 Maybe we can you that as base to propose a PR. |
Hello @marehr, FYI there is strong opposition against introducing new macros in this project. I'd recommend sticking to EricWF's advice. |
For reference and other people encountering this warning: see #1419 (comment) , that you can silence the warning by adding a comma and an empty macro argument, transforming TYPED_TEST_SUITE(TestName, TestTypes); to TYPED_TEST_SUITE(TestName, TestTypes, ); |
This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also google/googletest#2271
This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also google/googletest#2271
This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also google/googletest#2271
This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also google/googletest#2271 Reviewed By: arames, bkramer Differential Revision: https://reviews.llvm.org/D110283
Btw. C++20 has solved this issue by changing the requirements on variadic macros and the appropriate patch has been merged to Clang project and released since Clang 14. The warning wasn't very useful but it was correct. You'll have no issues on C++20 or higher in Clang 14 or higher. |
This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also google/googletest#2271
This avoids a -pedantic warning: warning: ISO C++11 requires at least one argument for the "..." in a variadic macro See also google/googletest#2271 llvm-monorepo: 05de4b413930418b60c0dd1e72681b476b50e7fb
When using TYPED_TEST_SUITE below error happens. (using master)
Here is log from clang:
path:14:48: error: must specify at least one argument for '...' parameter of variadic macro
[-Werror,-Wgnu-zero-variadic-macro-arguments]
TYPED_TEST_SUITE(XYZ, MyTypes );
^
path/gtest/googletest/include/gtest/gtest-typed-test.h:194:9: note: macro 'TYPED_TEST_SUITE' defined here
#define TYPED_TEST_SUITE(CaseName, Types, ...)
^
1 error generated.
Seems like continuation of #2069
The text was updated successfully, but these errors were encountered: