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 // Tests that the prototype for a function is updated. | 7 // Tests that the prototype for a function is updated. |
8 int testFunctionThatTakesTwoInts(int x, int y); | 8 int testFunctionThatTakesTwoInts(int x, int y); |
9 // Overload to test using declarations that introduce multiple shadow | 9 // Overload to test using declarations that introduce multiple shadow |
10 // declarations. | 10 // declarations. |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 // swap() functions are not renamed. | 30 // swap() functions are not renamed. |
31 void swap(SwapType& a, SwapType& b) {} | 31 void swap(SwapType& a, SwapType& b) {} |
32 | 32 |
33 // Note: F is already Google style and should not change. | 33 // Note: F is already Google style and should not change. |
34 void F() { | 34 void F() { |
35 // Test referencing a function without calling it. | 35 // Test referencing a function without calling it. |
36 int (*functionPointer)(int, int) = &testFunctionThatTakesTwoInts; | 36 int (*functionPointer)(int, int) = &testFunctionThatTakesTwoInts; |
37 } | 37 } |
38 | 38 |
| 39 void bug640688(int); // Declaration within blink namespace. |
| 40 |
39 } // namespace blink | 41 } // namespace blink |
40 | 42 |
| 43 // Definition outside of blink namespace. |
| 44 void blink::bug640688(int myParam) { |
| 45 char myVariable = 'c'; |
| 46 } |
| 47 |
41 using blink::testFunctionThatTakesTwoInts; | 48 using blink::testFunctionThatTakesTwoInts; |
42 | 49 |
43 void G() { | 50 void G() { |
44 testFunctionThatTakesTwoInts(1, 2); | 51 testFunctionThatTakesTwoInts(1, 2); |
45 | 52 |
46 blink::SwapType a, b; | 53 blink::SwapType a, b; |
47 swap(a, b); | 54 swap(a, b); |
48 } | 55 } |
OLD | NEW |