-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Workaround MSVC __VA_ARGS__ weirdness #2514
Conversation
// TODO(thejcannon): This just tests that this will compile, as gmock repeating the | ||
// noexcept specifier isn't supported yet | ||
struct MockUsesNoexceptWithParenthesis | ||
{ | ||
MOCK_METHOD(void, func, (), (noexcept(false))); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just delete this when we re-introduce #2498
Just tested it, it does not fix #2490. However, I don't think it can be fixed in googletest itself, as it is a bug in clang's ms-compatibility mode. (https://bugs.llvm.org/show_bug.cgi?id=43282) |
Well that's odd as both clang and MSVC natively now produce the right result, I would expect the "compatibility mode" to not matter. But also not surprised, these things are gross. |
@gennadiycivil Is there anything missing barring this from going to internal review? |
Thanks, we've started the internal review. Please avoid making further changes to the PR, as they might get lost in the process. |
Should fix #2490 and the errors after #2498 was merged.
The good news is we no longer need
GMOCK_PP_INTERNAL_USE_MSVC
😄Also see this Godbolt link which shows everyone agrees on the preprocessed output after this change (on MSVC, it's printed to(Stale now, but we're taking the same approach)stdout
, so scroll to the bottom of thestdout
output)