Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 class Foo {}; | 5 #include <utility> |
|
Nico
2016/07/01 20:00:26
This new test fails on the mac upload bots: https:
| |
| 6 | |
| 7 class Foo { | |
| 8 public: | |
| 9 void foo() {} | |
| 10 }; | |
| 6 | 11 |
| 7 void f(); | 12 void f(); |
| 8 | 13 |
| 9 int main() { | 14 int main() { |
| 10 int integer; | 15 int integer; |
| 11 Foo foo; | 16 Foo foo; |
| 12 | 17 |
| 13 auto int_copy = integer; | 18 auto int_copy = integer; |
| 14 const auto const_int_copy = integer; | 19 const auto const_int_copy = integer; |
| 15 const auto& const_int_ref = integer; | 20 const auto& const_int_ref = integer; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 28 auto* raw_foo_ptr_valid = &foo; | 33 auto* raw_foo_ptr_valid = &foo; |
| 29 const auto* const_raw_foo_ptr_valid = &foo; | 34 const auto* const_raw_foo_ptr_valid = &foo; |
| 30 | 35 |
| 31 int *int_ptr; | 36 int *int_ptr; |
| 32 | 37 |
| 33 auto double_ptr_auto = &int_ptr; | 38 auto double_ptr_auto = &int_ptr; |
| 34 auto* double_ptr_auto_ptr = &int_ptr; | 39 auto* double_ptr_auto_ptr = &int_ptr; |
| 35 auto** double_ptr_auto_double_ptr = &int_ptr; | 40 auto** double_ptr_auto_double_ptr = &int_ptr; |
| 36 | 41 |
| 37 auto function_ptr = &f; | 42 auto function_ptr = &f; |
| 43 auto method_ptr = &Foo::foo; | |
| 38 | 44 |
| 39 int *const *const volatile **const *pointer_awesomeness; | 45 int *const *const volatile **const *pointer_awesomeness; |
| 40 auto auto_awesome = pointer_awesomeness; | 46 auto auto_awesome = pointer_awesomeness; |
| 47 | |
| 48 auto& int_ptr_ref = int_ptr; | |
| 49 const auto& const_int_ptr_ref = int_ptr; | |
| 50 auto&& int_ptr_rref = std::move(int_ptr); | |
| 51 const auto&& const_int_ptr_rref = std::move(int_ptr); | |
| 41 } | 52 } |
| OLD | NEW |