Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Index / explicit-conversion-function.cpp
blobdf6ee733c4e6261662b24d0bd14a5e1f4965e3b4
1 struct Foo {
2 // Those are not explicit conversion functions
3 operator int();
4 explicit(false) operator float();
6 // Those are explicit conversion functions
7 explicit operator double();
8 explicit(true) operator unsigned char();
9 };
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]
13 // CHECK: CXXConversion=operator int:3:5 [type=int ()] [typekind=FunctionProto] [resulttype=int] [resulttypekind=Int] [isPOD=0] [isAnonRecDecl=0]
14 // CHECK: CXXConversion=operator float:4:21 [type=float ()] [typekind=FunctionProto] [resulttype=float] [resulttypekind=Float] [isPOD=0] [isAnonRecDecl=0]
15 // CHECK: CXXConversion=operator double:7:14 (explicit) [type=double ()] [typekind=FunctionProto] [resulttype=double] [resulttypekind=Double] [isPOD=0] [isAnonRecDecl=0]
16 // CHECK: CXXConversion=operator unsigned char:8:20 (explicit) [type=unsigned char ()] [typekind=FunctionProto] [resulttype=unsigned char] [resulttypekind=UChar] [isPOD=0] [isAnonRecDecl=0]