summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-internal.h
diff options
context:
space:
mode:
authorAndy Soffer <asoffer@google.com>2020-01-02 21:48:50 (GMT)
committerAndy Soffer <asoffer@google.com>2020-01-02 21:48:50 (GMT)
commit008629ae2163035dabd428d581379fa5aac4b7bb (patch)
treedd2ee66318da4f6de2249361a328edd9654e3a91 /googletest/include/gtest/internal/gtest-internal.h
parentd0a521255eb59ec6ff6e30fdf53c4f05f3fd3270 (diff)
parent1800a38fb7d8d4f923fc450875afa3bc16f01151 (diff)
downloadgoogletest-008629ae2163035dabd428d581379fa5aac4b7bb.zip
googletest-008629ae2163035dabd428d581379fa5aac4b7bb.tar.gz
googletest-008629ae2163035dabd428d581379fa5aac4b7bb.tar.bz2
Merge pull request #2624 from ShabbyX:master
PiperOrigin-RevId: 286397298
Diffstat (limited to 'googletest/include/gtest/internal/gtest-internal.h')
-rw-r--r--googletest/include/gtest/internal/gtest-internal.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/googletest/include/gtest/internal/gtest-internal.h b/googletest/include/gtest/internal/gtest-internal.h
index eac831a..59d2a83 100644
--- a/googletest/include/gtest/internal/gtest-internal.h
+++ b/googletest/include/gtest/internal/gtest-internal.h
@@ -79,7 +79,16 @@
#define GTEST_CONCAT_TOKEN_IMPL_(foo, bar) foo ## bar
// Stringifies its argument.
-#define GTEST_STRINGIFY_(name) #name
+// Work around a bug in visual studio which doesn't accept code like this:
+//
+// #define GTEST_STRINGIFY_(name) #name
+// #define MACRO(a, b, c) ... GTEST_STRINGIFY_(a) ...
+// MACRO(, x, y)
+//
+// Complaining about the argument to GTEST_STRINGIFY_ being empty.
+// This is allowed by the spec.
+#define GTEST_STRINGIFY_HELPER_(name, ...) #name
+#define GTEST_STRINGIFY_(...) GTEST_STRINGIFY_HELPER_(__VA_ARGS__, )
namespace proto2 { class Message; }