Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1513)

Unified Diff: third_party/WebKit/Source/wtf/Assertions.h

Issue 2513363002: Remove WTF_ATTRIBUTE_PRINTF. (Closed)
Patch Set: Remove comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 6305cf8203b7b667badde3015e647eaceda4b986..28af93a08d25f87328a1a5c4eaa00b164651dfd6 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
-
// 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);
« no previous file with comments | « third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp ('k') | third_party/WebKit/Source/wtf/Assertions.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698