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/SemaCXX/cxx2c-delete-with-message.cpp
+9-13Lines changed: 9 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -274,26 +274,22 @@ void operators() {
274
274
275
275
namespacegh135506 {
276
276
structa {
277
-
// FIXME: We currently don't diagnose these invalid redeclarations if the
278
-
// second declaration is defaulted or deleted. This probably needs to be
279
-
// handled in ParseCXXInlineMethodDef() after parsing the defaulted/deleted
280
-
// body.
281
-
friendconstevalintf() { return3; }
282
-
friendconstevalintf() = delete("foo");
277
+
friendconstevalintf() { return3; } // expected-note {{previous definition is here}}
278
+
friendconstevalintf() = delete("foo"); // expected-error {{redefinition of 'f'}}
283
279
284
-
friendconstevalintg() { return3; }
285
-
friendconstevalintg() = delete;
280
+
friendconstevalintg() { return3; }// expected-note {{previous definition is here}}
281
+
friendconstevalintg() = delete;// expected-error {{redefinition of 'g'}}
286
282
287
-
friendinth() { return3; }
288
-
friendinth() = delete;
283
+
friendinth() { return3; }// expected-note {{previous definition is here}}
284
+
friendinth() = delete;// expected-error {{redefinition of 'h'}}
289
285
290
-
friendconstevalinti() = delete; // expected-note {{previous definition is here}}
286
+
friendconstevalinti() = delete; // expected-note {{previous definition is here}}
291
287
friendconstevalinti() { return3; } // expected-error {{redefinition of 'i'}}
292
288
};
293
289
294
290
structb {
295
-
friendconstevalbooloperator==(b, b) { returntrue; } // expected-note {{previous declaration is here}}
296
-
friendconstevalbooloperator==(b, b) = default; // expected-error {{defaulting this equality comparison operator is not allowed because it was already declared outside the class}}
291
+
friendconstevalbooloperator==(b, b) { returntrue; } // expected-note {{previous definition is here}}
292
+
friendconstevalbooloperator==(b, b) = default; // expected-error {{redefinition of 'operator=='}}
0 commit comments