diff options
author | dim <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-06-10 20:45:12 +0000 |
commit | ea266cad53e3d49771fa38103913d3ec7a166694 (patch) | |
tree | 8f7776b7310bebaf415ac5b69e46e9f928c37144 /test/FixIt/fixit-cxx1y-compat.cpp | |
parent | c72c57c9e9b69944e3e009cd5e209634839581d3 (diff) | |
download | FreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.zip FreeBSD-src-ea266cad53e3d49771fa38103913d3ec7a166694.tar.gz |
Vendor import of clang tags/RELEASE_33/final r183502 (effectively, 3.3
release):
http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final@183502
Diffstat (limited to 'test/FixIt/fixit-cxx1y-compat.cpp')
-rw-r--r-- | test/FixIt/fixit-cxx1y-compat.cpp | 12 |
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 0000000..9fd5ff2 --- /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(); +}; |