Homec4science

Also define GTEST_ATTRIBUTE_PRINTF_ in clang-cl.

Authored by David Benjamin <davidben@google.com> on Jan 3 2018, 20:55.

Description

Also define GTEST_ATTRIBUTE_PRINTF_ in clang-cl.

clang-cl is clang for Windows running in MSVC mode. Chromium uses it for
Windows builds. clang-cl is weird in that it defines clang and
_MSC_VER, but *NOT* GNUC. This is vaguely analogous to how normal
clang defines clang (what it is) and GNUC (what it is compatible
with).

However, clang-cl still implements most GCC extensions, being clang.
Notably, the way to control -Wformat-literal is still with
attribute((format)). For better error-checking and strict
-Wformatl-literal compatibility (see
53c478d639b8eebd2942e88266610ebc79c541f6), define
GTEST_ATTRIBUTE_PRINTF_ in clang-cl too.

Details

Committed
David Benjamin <davidben@google.com>Jan 3 2018, 20:55
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:ba6ecedede74: Merge pull request #1374 from davidben/tuple-msvc
Branches
Unknown
Tags
Unknown

Event Timeline

David Benjamin <davidben@google.com> committed R9484:1acf8c752ee8: Also define GTEST_ATTRIBUTE_PRINTF_ in clang-cl. (authored by David Benjamin <davidben@google.com>).Jan 3 2018, 20:55