Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: tools/clang/rewrite_to_chrome_style/tests/functions-expected.cc

Issue 2639813002: --method-blocklist should also cover free functions. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 namespace { 7 namespace {
8 8
9 // Naive renaming will break the build, by leaving return type the same name as 9 // Naive renaming will break the build, by leaving return type the same name as
10 // the function name - to avoid this "Get" prefix needs to be prepended as 10 // the function name - to avoid this "Get" prefix needs to be prepended as
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 void swap(SwapType& a, SwapType& b) {} 44 void swap(SwapType& a, SwapType& b) {}
45 45
46 // Note: F is already Google style and should not change. 46 // Note: F is already Google style and should not change.
47 void F() { 47 void F() {
48 // Test referencing a function without calling it. 48 // Test referencing a function without calling it.
49 int (*function_pointer)(int, int) = &TestFunctionThatTakesTwoInts; 49 int (*function_pointer)(int, int) = &TestFunctionThatTakesTwoInts;
50 } 50 }
51 51
52 void Bug640688(int); // Declaration within blink namespace. 52 void Bug640688(int); // Declaration within blink namespace.
53 53
54 // Tests for --method-blocklist cmdline parameter.
55 namespace IdlFunctions {
56 void foo();
57 } // namespace IdlFunctions
58
54 } // namespace blink 59 } // namespace blink
55 60
56 // Definition outside of blink namespace. 61 // Definition outside of blink namespace.
57 void blink::Bug640688(int my_param) { 62 void blink::Bug640688(int my_param) {
58 char my_variable = 'c'; 63 char my_variable = 'c';
59 } 64 }
60 65
61 using blink::TestFunctionThatTakesTwoInts; 66 using blink::TestFunctionThatTakesTwoInts;
62 67
63 void G() { 68 void G() {
64 TestFunctionThatTakesTwoInts(1, 2); 69 TestFunctionThatTakesTwoInts(1, 2);
65 70
66 blink::SwapType a, b; 71 blink::SwapType a, b;
67 swap(a, b); 72 swap(a, b);
68 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698