================
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
+
+// CHECK: FunctionDecl {{.*}} <{{.*}}:4:1, col:17> {{.*}}
+void f() = delete;
+
+
+struct S {
+ inline S();
+ ~S();
+};
+
+//CHECK: CXXConstructorDecl {{.*}} <{{.*}}:13:1, col:23> {{.*}}
+inline S::S() = default;
+//CHECK: CXXDestructorDecl {{.*}} <{{.*}}:15:1, col:17> {{.*}}
+S::~S() = default;
+
+template <typename T>
+class U {
+ U();
+ ~U();
+};
+
+//CHECK: CXXConstructorDecl {{.*}} <{{.*}}:24:1, line:25:19> {{.*}}
+template <typename T>
+U<T>::U() = default;
----------------
zwuis wrote:
Verifying line numbers is brittle. Other people may add something before this
line. Ditto elsewhere.
You might consider writing code in one line.
```cpp
template ... = default;
```
https://github.com/llvm/llvm-project/pull/167007
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits