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 | |
danakj
2016/01/29 00:16:56
Probably need this in the expected too.
dcheng
2016/01/29 01:17:30
Oops done.
| |
8 // break test coverage that we don't clobber the class name by trying to emit | |
9 // replacements for synthesized functions. | |
7 class C { | 10 class C { |
8 public: | 11 public: |
9 // Make sure initializers are updated to use the new names. | 12 // Make sure initializers are updated to use the new names. |
10 C() : m_flagField(~0), m_fieldMentioningHTTPAndHTTPS(1) {} | 13 C() : m_flagField(~0), m_fieldMentioningHTTPAndHTTPS(1) {} |
11 | 14 |
12 int method() { | 15 int method() { |
13 // Test that references to fields are updated correctly. | 16 // Test that references to fields are updated correctly. |
14 return instanceCount + m_flagField + m_fieldMentioningHTTPAndHTTPS; | 17 return instanceCount + m_flagField + m_fieldMentioningHTTPAndHTTPS; |
15 } | 18 } |
16 | 19 |
(...skipping 26 matching lines...) Expand all Loading... | |
43 char fourChars[4]; | 46 char fourChars[4]; |
44 short twoShorts[2]; | 47 short twoShorts[2]; |
45 int one_hopefully_four_byte_int; | 48 int one_hopefully_four_byte_int; |
46 }; | 49 }; |
47 | 50 |
48 } // namespace blink | 51 } // namespace blink |
49 | 52 |
50 void F() { | 53 void F() { |
51 // Test that references to a static field are correctly rewritten. | 54 // Test that references to a static field are correctly rewritten. |
52 blink::C::instanceCount++; | 55 blink::C::instanceCount++; |
56 // Force instantiation of a copy constructor for blink::C to make sure field | |
57 // initializers for synthesized functions don't cause weird rewrites. | |
58 blink::C c; | |
59 blink::C c2 = c; | |
53 } | 60 } |
OLD | NEW |