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

Side by Side Diff: tools/clang/plugins/tests/auto_raw_pointer.cpp

Issue 2118653003: clang-plugin: Remove system include from auto_raw_pointer test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | tools/clang/plugins/tests/auto_raw_pointer.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include <utility>
6
7 class Foo { 5 class Foo {
8 public: 6 public:
9 void foo() {} 7 void foo() {}
10 }; 8 };
11 9
12 void f(); 10 void f();
13 11
14 int main() { 12 int main() {
15 int integer; 13 int integer;
16 Foo foo; 14 Foo foo;
17 15
18 auto int_copy = integer; 16 auto int_copy = integer;
19 const auto const_int_copy = integer; 17 const auto const_int_copy = integer;
20 const auto& const_int_ref = integer; 18 const auto& const_int_ref = integer;
21 19
22 auto raw_int_ptr = &integer; 20 auto raw_int_ptr = &integer;
23 const auto const_raw_int_ptr = &integer; 21 const auto const_raw_int_ptr = &integer;
24 const auto& const_raw_int_ptr_ref = &integer; 22 const auto& const_raw_int_ptr_ref = &integer;
25 23
26 auto* raw_int_ptr_valid = &integer; 24 auto* raw_int_ptr_valid = &integer;
27 const auto* const_raw_int_ptr_valid = &integer; 25 const auto* const_raw_int_ptr_valid = &integer;
28 26
29 auto raw_foo_ptr = &foo; 27 auto raw_foo_ptr = &foo;
30 const auto const_raw_foo_ptr = &foo; 28 const auto const_raw_foo_ptr = &foo;
31 const auto& const_raw_foo_ptr_ref = &foo; 29 const auto& const_raw_foo_ptr_ref = &foo;
32 30
33 auto* raw_foo_ptr_valid = &foo; 31 auto* raw_foo_ptr_valid = &foo;
34 const auto* const_raw_foo_ptr_valid = &foo; 32 const auto* const_raw_foo_ptr_valid = &foo;
35 33
36 int *int_ptr; 34 int* int_ptr;
37 35
38 auto double_ptr_auto = &int_ptr; 36 auto double_ptr_auto = &int_ptr;
39 auto* double_ptr_auto_ptr = &int_ptr; 37 auto* double_ptr_auto_ptr = &int_ptr;
40 auto** double_ptr_auto_double_ptr = &int_ptr; 38 auto** double_ptr_auto_double_ptr = &int_ptr;
41 39
42 auto function_ptr = &f; 40 auto function_ptr = &f;
43 auto method_ptr = &Foo::foo; 41 auto method_ptr = &Foo::foo;
44 42
45 int *const *const volatile **const *pointer_awesomeness; 43 int* const* const volatile** const* pointer_awesomeness;
46 auto auto_awesome = pointer_awesomeness; 44 auto auto_awesome = pointer_awesomeness;
47 45
48 auto& int_ptr_ref = int_ptr; 46 auto& int_ptr_ref = int_ptr;
49 const auto& const_int_ptr_ref = int_ptr; 47 const auto& const_int_ptr_ref = int_ptr;
50 auto&& int_ptr_rref = std::move(int_ptr); 48 auto&& int_ptr_rref = static_cast<int*&&>(int_ptr);
51 const auto&& const_int_ptr_rref = std::move(int_ptr); 49 const auto&& const_int_ptr_rref = static_cast<int*&&>(int_ptr);
52 } 50 }
OLDNEW
« no previous file with comments | « no previous file | tools/clang/plugins/tests/auto_raw_pointer.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698