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 (*function_pointer)(int, int) = &TestFunctionThatTakesTwoInts; | 36 int (*function_pointer)(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 my_param) { |
| 45 char my_variable = '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 |