annotate clang/test/FixIt/fixit-cxx1y-compat.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -verify -std=c++11 %s
anatofuz
parents:
diff changeset
2 // RUN: cp %s %t
anatofuz
parents:
diff changeset
3 // RUN: %clang_cc1 -x c++ -std=c++11 -fixit %t
anatofuz
parents:
diff changeset
4 // RUN: %clang_cc1 -Wall -pedantic-errors -Werror -x c++ -std=c++11 %t
anatofuz
parents:
diff changeset
5 // RUN: %clang_cc1 -Wall -pedantic-errors -Werror -x c++ -std=c++1y %t
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 // This is a test of the code modification hints for C++1y-compatibility problems.
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 struct S {
anatofuz
parents:
diff changeset
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}}
anatofuz
parents:
diff changeset
11 int &f();
anatofuz
parents:
diff changeset
12 };