llvm-project/clang/test/AST/ast-print-cxx2c-delete-with-message.cpp
Sirraide ef164cee90
[Clang] [C++26] Implement P2573R2: = delete("should have a reason"); (#86526)
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)).
2024-04-14 12:30:01 +02:00

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");