24 lines · plain
1// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -finclude-default-header -x hlsl -ast-dump -o - %s | FileCheck %s2 3// CHECK:ExportDecl 0x{{[0-9a-f]+}} <{{.*}}> col:14// CHECK:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> col:13 used f1 'void ()'5// CHECK:CompoundStmt 0x{{[0-9a-f]+}} <{{.*}}>6export void f1() {}7 8// CHECK:NamespaceDecl 0x{{[0-9a-f]+}} <{{.*}}>9// CHECK:ExportDecl 0x{{[0-9a-f]+}} <{{.*}}> col:310// CHECK:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> col:15 used f2 'void ()'11// CHECK:CompoundStmt 0x{{[0-9a-f]+}} <{{.*}}>12namespace MyNamespace {13 export void f2() {}14}15 16// CHECK:ExportDecl 0x{{[0-9a-f]+}} <{{.*}}>17// CHECK:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> col:10 used f3 'void ()'18// CHECK:FunctionDecl 0x{{[0-9a-f]+}} <{{.*}}> col:10 used f4 'void ()'19// CHECK:CompoundStmt 0x{{[0-9a-f]+}} <{{.*}}>20export {21 void f3() {}22 void f4() {}23}24