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

Unified Diff: tools/clang/rewrite_to_chrome_style/tests/template-original.cc

Issue 2640283003: Look at canonical decl, when deciding whether to rename or not. (Closed)
Patch Set: Fixed handling of function template specializations. Created 3 years, 11 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
Index: tools/clang/rewrite_to_chrome_style/tests/template-original.cc
diff --git a/tools/clang/rewrite_to_chrome_style/tests/template-original.cc b/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
index 47aef5d85b6c7594312577e1d0aa73381c630986..ef903d8b620c42a89208758186fc4f0732abfda9 100644
--- a/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
+++ b/tools/clang/rewrite_to_chrome_style/tests/template-original.cc
@@ -337,6 +337,31 @@ class IntrusiveHeap {
} // namespace blacklisting_of_renaming_of_begin_method
+namespace specializations {
+
+template <unsigned long sizeOfValue>
+int toV8SignedIntegerInternal(long value);
+
+template <>
+int toV8SignedIntegerInternal<4>(long value) {
+ return 123 + value;
+}
+
+template <>
+int toV8SignedIntegerInternal<8>(long value) {
+ return 456 + value;
+}
+
+int toV8(int value) {
+ return toV8SignedIntegerInternal<sizeof value>(value);
+}
+
+int toV8(long value) {
+ return toV8SignedIntegerInternal<sizeof value>(value);
+}
+
+} // namespace specializations
+
} // namespace blink
namespace not_blink {

Powered by Google App Engine
This is Rietveld 408576698