================
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -std=c++11 -ast-dump %s | FileCheck %s
+
+void delfunc() = delete;
+// CHECK: FunctionDecl{{.*}} <{{.*}}[[@LINE-1]]:1, col:23> col:6 delfunc 'void
()' delete
+
+struct S {
+ inline S();
+};
+
+inline S::S() = default;
+// CHECK: CXXConstructorDecl{{.*}} <line:[[@LINE-1]]:1, col:23>{{.*}}S 'void
()' inline default
+
+struct v {
+ void f() = delete;
+};
+// CHECK: CXXMethodDecl{{.*}} <line:[[@LINE-2]]:3, col:19> col:8 f 'void ()'
delete
+
+class Truck {
+ inline Truck();
+};
+
+inline Truck::Truck() = default;
----------------
lodha1503 wrote:
There is a c++ rule : = delete must appear on the first declaration . Since
Truck() is first declared inside the class ( without =delete ), the out of
class = delete is ill-formed
To make Truck test inline delete without being same as test case S , the fix is
to move the =delete inside the class only
Eg :
class Truck {
inline Truck() = delete;
}
// here i will write the check
should i proceed with this test case ?
https://github.com/llvm/llvm-project/pull/205408
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits