Chromium Code Reviews| Index: third_party/WebKit/Source/wtf/Assertions.h |
| diff --git a/third_party/WebKit/Source/wtf/Assertions.h b/third_party/WebKit/Source/wtf/Assertions.h |
| index 438e7aa9de8955502c9d843da3f64aa02f6404fc..66920201b7f0dfbf3d57c8da8c26990846aec1b9 100644 |
| --- a/third_party/WebKit/Source/wtf/Assertions.h |
| +++ b/third_party/WebKit/Source/wtf/Assertions.h |
| @@ -60,13 +60,6 @@ |
| #define LOG_DISABLED !ENABLE(ASSERT) |
| #endif |
| -#if COMPILER(GCC) |
| -#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) \ |
| - __attribute__((__format__(printf, formatStringArgument, extraArguments))) |
| -#else |
| -#define WTF_ATTRIBUTE_PRINTF(formatStringArgument, extraArguments) |
| -#endif |
|
Yuta Kitamura
2016/11/21 08:58:39
Can you explicitly include base/compiler_specific.
tkent
2016/11/21 09:12:30
The Blink counterpart of base/compiler_specific.h
Yuta Kitamura
2016/11/21 09:27:48
That's okay, too.
tkent
2016/11/22 02:15:18
Uploaded Patch Set 2.
|
| - |
| // These helper functions are always declared, but not necessarily always |
| // defined if the corresponding function is disabled. |
| @@ -75,8 +68,7 @@ WTF_EXPORT void WTFReportAssertionFailure(const char* file, |
| const char* function, |
| const char* assertion); |
| // WTFLogAlways() is deprecated. crbug.com/638849 |
| -WTF_EXPORT void WTFLogAlways(const char* format, ...) |
| - WTF_ATTRIBUTE_PRINTF(1, 2); |
| +WTF_EXPORT PRINTF_FORMAT(1, 2) void WTFLogAlways(const char* format, ...); |
| WTF_EXPORT void WTFReportBacktrace(int framesToShow = 31); |
| namespace WTF { |
| @@ -103,10 +95,9 @@ class WTF_EXPORT ScopedLogger { |
| // The first message is passed to the constructor. Additional messages for |
| // the same scope can be added with log(). If condition is false, produce no |
| // output and do not create a scope. |
| - ScopedLogger(bool condition, const char* format, ...) |
| - WTF_ATTRIBUTE_PRINTF(3, 4); |
| + PRINTF_FORMAT(3, 4) ScopedLogger(bool condition, const char* format, ...); |
| ~ScopedLogger(); |
| - void log(const char* format, ...) WTF_ATTRIBUTE_PRINTF(2, 3); |
| + PRINTF_FORMAT(2, 3) void log(const char* format, ...); |
| private: |
| FRIEND_TEST_ALL_PREFIXES(AssertionsTest, ScopedLogger); |