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

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

Issue 2271203004: Tweak |in_blink_namespace|, to look at ancestors *and also* at qualifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-style-same-type-and-method-name
Patch Set: Using hasTopLevelPrefix instead of hasPrefix. Created 4 years, 3 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 // 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698