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

Unified Diff: include/core/SkPostConfig.h

Issue 14365009: Feed Clang a pragma to ignore -Wc++11-extensions to let it build Skia on Mac. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: sigh, now both Clang and GCC work Created 7 years, 8 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPostConfig.h
diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h
index 86393ed446103fbd927bb10d84742d91dec5ff59..64768c6faf82ca763080ce0a22586360b1eebae6 100644
--- a/include/core/SkPostConfig.h
+++ b/include/core/SkPostConfig.h
@@ -322,6 +322,11 @@
#if defined(_MSC_VER)
#define SK_OVERRIDE override
#elif defined(__clang__) && !defined(SK_BUILD_FOR_IOS)
+ // Clang defaults to C++03 and warns about using override. Squelch that. Intentionally no
+ // push/pop here so all users of SK_OVERRIDE ignore the warning too. This is like passing
+ // -Wno-c++11-extensions, except that GCC won't die (because it won't see this pragma).
+ #pragma clang diagnostic ignored "-Wc++11-extensions"
+
#if __has_feature(cxx_override_control)
// Some documentation suggests we should be using __attribute__((override)),
// but it doesn't work.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698