brintos

brintos / llvm-project-archived public Read only

0
0
Text · 526 B · 819e398 Raw
13 lines · cpp
1// RUN: %clang_cc1 -verify -std=c++11 %s2// RUN: cp %s %t3// RUN: %clang_cc1 -x c++ -std=c++11 -fixit %t4// RUN: %clang_cc1 -Wall -pedantic-errors -Werror -x c++ -std=c++11 %t5// RUN: %clang_cc1 -Wall -pedantic-errors -Werror -x c++ -std=c++1y %t6 7// This is a test of the code modification hints for C++1y-compatibility problems.8 9struct S {10  constexpr int &f(); // expected-warning {{'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior}}11  int &f();12};13