Index: third_party/WebKit/Source/build/scripts/make_css_value_keywords.py |
diff --git a/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py b/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py |
index c39804676260e4c1f96f6541af64b3f914b10aa3..71c4efc6f4d8282e88dd95e3f3f411ddabad2c52 100755 |
--- a/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py |
+++ b/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py |
@@ -52,6 +52,12 @@ GPERF_TEMPLATE = """ |
#pragma warning(disable : 4302 4311) |
#endif |
+#if defined(__clang__) |
+#pragma clang diagnostic push |
+// TODO(thakis): Remove once we use a gperf that no longer produces "register". |
+#pragma clang diagnostic ignored "-Wdeprecated-register" |
+#endif |
+ |
namespace blink { |
static const char valueListStringPool[] = { |
%(value_keyword_strings)s |
@@ -78,27 +84,29 @@ struct Value; |
%%%% |
%(value_keyword_to_enum_map)s |
%%%% |
-const Value* findValue(register const char* str, register unsigned int len) |
-{ |
- return CSSValueKeywordsHash::findValueImpl(str, len); |
+ |
+#if defined(__clang__) |
+#pragma clang diagnostic pop |
+#endif |
+ |
+const Value* findValue(const char* str, unsigned int len) { |
+ return CSSValueKeywordsHash::findValueImpl(str, len); |
} |
-const char* getValueName(CSSValueID id) |
-{ |
- ASSERT(id > 0 && id < numCSSValueKeywords); |
- return valueListStringPool + valueListStringOffsets[id - 1]; |
+const char* getValueName(CSSValueID id) { |
+ ASSERT(id > 0 && id < numCSSValueKeywords); |
+ return valueListStringPool + valueListStringOffsets[id - 1]; |
} |
-bool isValueAllowedInMode(unsigned short id, CSSParserMode mode) |
-{ |
- switch (id) { |
- %(ua_sheet_mode_values_keywords)s |
- return isUASheetBehavior(mode); |
- %(quirks_mode_or_ua_sheet_mode_values_keywords)s |
- return isUASheetBehavior(mode) || isQuirksModeBehavior(mode); |
- default: |
- return true; |
- } |
+bool isValueAllowedInMode(unsigned short id, CSSParserMode mode) { |
+ switch (id) { |
+ %(ua_sheet_mode_values_keywords)s |
+ return isUASheetBehavior(mode); |
+ %(quirks_mode_or_ua_sheet_mode_values_keywords)s |
+ return isUASheetBehavior(mode) || isQuirksModeBehavior(mode); |
+ default: |
+ return true; |
+ } |
} |
} // namespace blink |