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

Side by Side Diff: tools/clang/rewrite_to_chrome_style/tests/function-templates-expected.cc

Issue 2601063002: Blacklisting of method names coming from std library. (Closed)
Patch Set: Also blacklisting "insert". 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 namespace WTF { 5 namespace WTF {
6 6
7 template <typename To, typename From> 7 template <typename To, typename From>
8 bool IsInBounds(From value) { 8 bool IsInBounds(From value) {
9 return true; 9 return true;
10 } 10 }
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 bool HasOverflowed() const { return false; } 31 bool HasOverflowed() const { return false; }
32 void Overflowed() {} 32 void Overflowed() {}
33 33
34 private: 34 private:
35 T value_; 35 T value_;
36 }; 36 };
37 37
38 template <typename To, typename From> 38 template <typename To, typename From>
39 To Bitwise_cast(From from) { 39 To bitwise_cast(From from) {
40 static_assert(sizeof(To) == sizeof(From), "msg"); 40 static_assert(sizeof(To) == sizeof(From), "msg");
41 return reinterpret_cast<To>(from); 41 return reinterpret_cast<To>(from);
42 } 42 }
43 43
44 } // namespace WTF 44 } // namespace WTF
45 45
46 namespace mojo { 46 namespace mojo {
47 47
48 template <typename U> 48 template <typename U>
49 struct ArrayTraits; 49 struct ArrayTraits;
50 50
51 template <typename U> 51 template <typename U>
52 struct ArrayTraits<WTF::Checked<U, int>> { 52 struct ArrayTraits<WTF::Checked<U, int>> {
53 static bool HasOverflowed(WTF::Checked<U, int>& input) { 53 static bool HasOverflowed(WTF::Checked<U, int>& input) {
54 // |hasOverflowed| below should be rewritten to |HasOverflowed| 54 // |hasOverflowed| below should be rewritten to |HasOverflowed|
55 // (because this is a method of WTF::Checked; it doesn't matter 55 // (because this is a method of WTF::Checked; it doesn't matter
56 // that we are not in WTF namespace *here*). 56 // that we are not in WTF namespace *here*).
57 return input.HasOverflowed(); 57 return input.HasOverflowed();
58 } 58 }
59 }; 59 };
60 60
61 } // namespace mojo 61 } // namespace mojo
62 62
63 using WTF::Bitwise_cast; 63 using WTF::bitwise_cast;
64 using WTF::SafeCast; 64 using WTF::SafeCast;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698