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 class C { | 7 class C { |
8 public: | 8 public: |
9 // Make sure initializers are updated to use the new names. | 9 // Make sure initializers are updated to use the new names. |
10 C() : flag_field_(~0), field_mentioning_http_and_https_(1) {} | 10 C() : flag_field_(~0), field_mentioning_http_and_https_(1) {} |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 char fourChars[4]; | 43 char fourChars[4]; |
44 short twoShorts[2]; | 44 short twoShorts[2]; |
45 int one_hopefully_four_byte_int; | 45 int one_hopefully_four_byte_int; |
46 }; | 46 }; |
47 | 47 |
48 } // namespace blink | 48 } // namespace blink |
49 | 49 |
50 void F() { | 50 void F() { |
51 // Test that references to a static field are correctly rewritten. | 51 // Test that references to a static field are correctly rewritten. |
52 blink::C::instance_count_++; | 52 blink::C::instance_count_++; |
| 53 // Force instantiation of a copy constructor for blink::C to make sure field |
| 54 // initializers for synthesized functions don't cause weird rewrites. |
| 55 blink::C c; |
| 56 blink::C c2 = c; |
53 } | 57 } |
OLD | NEW |