brintos

brintos / llvm-project-archived public Read only

0
0
Text · 488 B · 2352bb7 Raw
17 lines · cpp
1// RUN: %clang_cc1 -std=c++11 %s -verify2// RUN: %clang_cc1 -std=c++1y %s -verify -DCXX1Y3 4struct X {5  constexpr int f(); // @56  int f();           // @67};8 9#ifdef CXX1Y10// FIXME: Detect this situation and provide a better recovery.11 12// expected-error@6 {{class member cannot be redeclared}}13// expected-note@5 {{previous}}14#else15// expected-warning@5 {{'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior}}16#endif17