| 1 |
struct Foo { |
| 2 |
// Those are not explicit constructors |
| 3 |
Foo(int); |
| 4 |
explicit(false) Foo(float); |
| 5 |
|
| 6 |
// Those are explicit constructors |
| 7 |
explicit Foo(double); |
| 8 |
explicit(true) Foo(unsigned char); |
| 9 |
}; |
| 10 |
|
| 11 |
// RUN: c-index-test -test-print-type --std=c++20 %s | FileCheck %s |
| 12 |
// CHECK: StructDecl=Foo:1:8 (Definition) [type=Foo] [typekind=Record] [isPOD=0] |
| 13 |
// CHECK: CXXConstructor=Foo:3:5 (converting constructor) [type=void (int)] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [int] [Int]] [isPOD=0] [isAnonRecDecl=0] |
| 14 |
// CHECK: CXXConstructor=Foo:4:21 (converting constructor) [type=void (float)] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [float] [Float]] [isPOD=0] [isAnonRecDecl=0] |
| 15 |
// CXXConstructor=Foo:7:20 (explicit) [type=void (double)] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [double] [Double]] [isPOD=0] [isAnonRecDecl=0] |
| 16 |
// CXXConstructor=Foo:8:20 (explicit) [type=void (unsigned char)] [typekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [unsigned char] [UChar]] [isPOD=0] [isAnonRecDecl=0] |