| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 blink { | 5 namespace blink { |
| 6 | 6 |
| 7 // Note: do not add any copy or move constructors to this class: doing so will | 7 // Note: do not add any copy or move constructors to this class: doing so will |
| 8 // break test coverage that we don't clobber the class name by trying to emit | 8 // break test coverage that we don't clobber the class name by trying to emit |
| 9 // replacements for synthesized functions. | 9 // replacements for synthesized functions. |
| 10 class C { | 10 class C { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // Unions also use struct-style naming. | 50 // Unions also use struct-style naming. |
| 51 union U { | 51 union U { |
| 52 char fourChars[4]; | 52 char fourChars[4]; |
| 53 short twoShorts[2]; | 53 short twoShorts[2]; |
| 54 int one_hopefully_four_byte_int; | 54 int one_hopefully_four_byte_int; |
| 55 int m_hasPrefix; | 55 int m_hasPrefix; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace blink | 58 } // namespace blink |
| 59 | 59 |
| 60 namespace WTF { |
| 61 |
| 62 struct TypeTrait { |
| 63 // WTF has structs for things like type traits, which we don't want to |
| 64 // capitalize. |
| 65 static const bool value = true; |
| 66 }; |
| 67 |
| 68 }; // namespace WTF |
| 69 |
| 60 void F() { | 70 void F() { |
| 61 // Test that references to a static field are correctly rewritten. | 71 // Test that references to a static field are correctly rewritten. |
| 62 blink::C::instanceCount++; | 72 blink::C::instanceCount++; |
| 63 // Force instantiation of a copy constructor for blink::C to make sure field | 73 // Force instantiation of a copy constructor for blink::C to make sure field |
| 64 // initializers for synthesized functions don't cause weird rewrites. | 74 // initializers for synthesized functions don't cause weird rewrites. |
| 65 blink::C c; | 75 blink::C c; |
| 66 blink::C c2 = c; | 76 blink::C c2 = c; |
| 77 |
| 78 bool b = WTF::TypeTrait::value; |
| 67 } | 79 } |
| OLD | NEW |