You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -154,3 +154,14 @@ namespace {
154
154
// FIXME: We should diagnose this prior to C++17.
155
155
constint &r = A::n;
156
156
}
157
+
158
+
#if __cplusplus < 201402L
159
+
namespaceImplicitConstexprDef {
160
+
structA {
161
+
voidf(); // expected-note {{member declaration does not match because it is not const qualified}}
162
+
};
163
+
164
+
constexprvoidA::f() { } // expected-warning {{'constexpr' non-static member function will not be implicitly 'const' in C++14; add 'const' to avoid a change in behavior}}
165
+
// expected-error@-1 {{out-of-line definition of 'f' does not match any declaration in 'ImplicitConstexprDef::A'}}
0 commit comments