summaryrefslogtreecommitdiff
path: root/test/FixIt/fixit-cxx1y-compat.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-06-10 20:45:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-06-10 20:45:12 +0000
commit6a0372513edbc473b538d2f724efac50405d6fef (patch)
tree8f7776b7310bebaf415ac5b69e46e9f928c37144 /test/FixIt/fixit-cxx1y-compat.cpp
parent809500fc2c13c8173a16b052304d983864e4a1e1 (diff)
Notes
Diffstat (limited to 'test/FixIt/fixit-cxx1y-compat.cpp')
-rw-r--r--test/FixIt/fixit-cxx1y-compat.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/FixIt/fixit-cxx1y-compat.cpp b/test/FixIt/fixit-cxx1y-compat.cpp
new file mode 100644
index 000000000000..9fd5ff26e558
--- /dev/null
+++ b/test/FixIt/fixit-cxx1y-compat.cpp
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -verify -std=c++11 %s
+// RUN: cp %s %t
+// RUN: %clang_cc1 -x c++ -std=c++11 -fixit %t
+// RUN: %clang_cc1 -Wall -pedantic-errors -Werror -x c++ -std=c++11 %t
+// RUN: %clang_cc1 -Wall -pedantic-errors -Werror -x c++ -std=c++1y %t
+
+// This is a test of the code modification hints for C++1y-compatibility problems.
+
+struct S {
+ constexpr int &f(); // expected-warning {{'constexpr' non-static member function will not be implicitly 'const' in C++1y; add 'const' to avoid a change in behavior}}
+ int &f();
+};