Stop MSVC from complaining about digraphs not being supported
authorChristopher Dykes <cdykes@fb.com>
Fri, 23 Jun 2017 01:09:20 +0000 (18:09 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 23 Jun 2017 01:24:36 +0000 (18:24 -0700)
Summary: MSVC complains about `<:` being a digraph and that it isn't interpreting it as one (C4628). Make it be quiet by making it not look like a digraph.

Reviewed By: simpkins

Differential Revision: D5305162

fbshipit-source-id: 7385164e8f73226ce18bc04c32894c2f27f8ae25

folly/experimental/logging/Logger.h
folly/experimental/logging/xlog.h

index 36a8018e1f7970058b28e23304a362e19e668974..5525c4ea1e87eb24dbe7c9e22065fd0172315d4e 100644 (file)
  *
  * This macro generally should not be used directly by end users.
  */
+/* clang-format off */
 #define FB_LOG_IMPL(logger, level, type, ...)                                \
   (!(logger).getCategory()->logCheck(level))                                 \
       ? ::folly::logDisabledHelper(                                          \
             std::integral_constant<bool, ::folly::isLogLevelFatal(level)>{}) \
-      : ::folly::LogStreamVoidify<::folly::isLogLevelFatal(level)>{} &       \
+      : ::folly::LogStreamVoidify< ::folly::isLogLevelFatal(level)>{} &      \
           ::folly::LogStreamProcessor{(logger).getCategory(),                \
                                       (level),                               \
                                       __FILE__,                              \
@@ -39,6 +40,7 @@
                                       (type),                                \
                                       ##__VA_ARGS__}                         \
               .stream()
+/* clang-format on */
 
 /**
  * Log a message to the specified logger.
index 686bb1c7ec6db3fef4487012d20f45a9b00736f5..a8abbd50102fd408f819a8f2c0e8500b6bdcaa3b 100644 (file)
  *   initialized.  On all subsequent calls, disabled log statements can be
  *   skipped with just a single check of the LogLevel.
  */
+/* clang-format off */
 #define XLOG_IMPL(level, type, ...)                                          \
   (!XLOG_IS_ON_IMPL(level))                                                  \
       ? ::folly::logDisabledHelper(                                          \
             std::integral_constant<bool, ::folly::isLogLevelFatal(level)>{}) \
-      : ::folly::LogStreamVoidify<::folly::isLogLevelFatal(level)>{} &       \
+      : ::folly::LogStreamVoidify< ::folly::isLogLevelFatal(level)>{} &      \
           ::folly::LogStreamProcessor(                                       \
               [] {                                                           \
                 static ::folly::XlogCategoryInfo<XLOG_IS_IN_HEADER_FILE>     \
               (type),                                                        \
               ##__VA_ARGS__)                                                 \
               .stream()
+/* clang-format on */
 
 /**
  * Check if and XLOG() statement with the given log level would be enabled.