minix/external/bsd/llvm/dist/clang/test/FixIt/fixit-cxx1y-compat.cpp
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

12 lines
526 B
C++

// 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();
};