mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 16:06:05 +00:00

This implements support for the `= delete("message")` syntax that was only just added to C++26 ([P2573R2](https://isocpp.org/files/papers/P2573R2.html#proposal-scope)).
19 lines
497 B
C++
19 lines
497 B
C++
// Without serialization:
|
|
// RUN: %clang_cc1 -ast-print %s | FileCheck %s
|
|
//
|
|
// With serialization:
|
|
// RUN: %clang_cc1 -emit-pch -o %t %s
|
|
// RUN: %clang_cc1 -x c++ -include-pch %t -ast-print /dev/null | FileCheck %s
|
|
|
|
// CHECK: struct S {
|
|
struct S {
|
|
// CHECK-NEXT: void a() = delete("foo");
|
|
void a() = delete("foo");
|
|
|
|
// CHECK-NEXT: template <typename T> T b() = delete("bar");
|
|
template <typename T> T b() = delete("bar");
|
|
};
|
|
|
|
// CHECK: void c() = delete("baz");
|
|
void c() = delete("baz");
|