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

Unified Diff: tools/clang/plugins/tests/auto_raw_pointer.cpp

Issue 2108823004: clang-plugins: Don't strip non const references in auto raw ptr fixits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.cpp ('k') | tools/clang/plugins/tests/auto_raw_pointer.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/tests/auto_raw_pointer.cpp
diff --git a/tools/clang/plugins/tests/auto_raw_pointer.cpp b/tools/clang/plugins/tests/auto_raw_pointer.cpp
index 4e1c0f054814b48b271a960eb7a2edab6ffa368e..55214a8bbdab1e9b7e5ce9d9b05e5399acd013b4 100644
--- a/tools/clang/plugins/tests/auto_raw_pointer.cpp
+++ b/tools/clang/plugins/tests/auto_raw_pointer.cpp
@@ -2,7 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-class Foo {};
+#include <utility>
Nico 2016/07/01 20:00:26 This new test fails on the mac upload bots: https:
+
+class Foo {
+ public:
+ void foo() {}
+};
void f();
@@ -35,7 +40,13 @@ int main() {
auto** double_ptr_auto_double_ptr = &int_ptr;
auto function_ptr = &f;
+ auto method_ptr = &Foo::foo;
int *const *const volatile **const *pointer_awesomeness;
auto auto_awesome = pointer_awesomeness;
+
+ auto& int_ptr_ref = int_ptr;
+ const auto& const_int_ptr_ref = int_ptr;
+ auto&& int_ptr_rref = std::move(int_ptr);
+ const auto&& const_int_ptr_rref = std::move(int_ptr);
}
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.cpp ('k') | tools/clang/plugins/tests/auto_raw_pointer.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698