1 // RUN: %clang_cc1 -std=c++11 -triple aarch64-arm-none-eabi -target-feature -fp8 -ast-dump %s | \
2 // RUN: FileCheck %s --strict-whitespace
4 // REQUIRES: aarch64-registered-target || arm-registered-target
6 /* Various contexts where type __mfp8 can appear. */
14 //CHECK: |-NamespaceDecl {{.*}}
15 //CHECK-NEXT: | |-VarDecl {{.*}} f2n '__mfp8'
16 //CHECK-NEXT: | `-VarDecl {{.*}} arr1n '__mfp8[10]'
19 const __mfp8
func1n(const __mfp8 mfp8
) {
25 //CHECK: |-FunctionDecl {{.*}} func1n 'const __mfp8 (const __mfp8)'
26 //CHECK: | `-VarDecl {{.*}} f1n '__mfp8'
27 //CHECK-NEXT: |-BinaryOperator {{.*}} '__mfp8' lvalue '='
28 //CHECK-NEXT: | |-DeclRefExpr {{.*}} '__mfp8' lvalue Var {{.*}} 'f1n' '__mfp8'
29 //CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
30 //CHECK-NEXT: | `-DeclRefExpr {{.*}} 'const __mfp8' lvalue ParmVar {{.*}} 'mfp8' 'const __mfp8'
31 //CHECK-NEXT: `-ReturnStmt {{.*}}
32 //CHECK-NEXT: `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
33 //CHECK-NEXT: `-DeclRefExpr {{.*}} '__mfp8' lvalue Var {{.*}} 'f1n' '__mfp8'
40 static const __mfp8 f2c
;
43 C1(__mfp8 arg
) : f1c(arg
), f3c(arg
) { }
44 __mfp8
func1c(__mfp8 arg
) {
47 static __mfp8
func2c(__mfp8 arg
) {
52 //CHECK: | |-CXXRecordDecl {{.*}} referenced class C1
53 //CHECK-NEXT: | |-FieldDecl {{.*}} f1c '__mfp8'
54 //CHECK-NEXT: | |-VarDecl {{.*}} f2c 'const __mfp8' static
55 //CHECK-NEXT: | |-FieldDecl {{.*}} f3c 'volatile __mfp8'
56 //CHECK-NEXT: | |-AccessSpecDecl {{.*}}
57 //CHECK-NEXT: | |-CXXConstructorDecl {{.*}} C1 'void (__mfp8)' implicit-inline
58 //CHECK-NEXT: | | |-ParmVarDecl {{.*}} arg '__mfp8'
59 //CHECK-NEXT: | | |-CXXCtorInitializer {{.*}} 'f1c' '__mfp8'
60 //CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
61 //CHECK-NEXT: | | | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
62 //CHECK-NEXT: | | |-CXXCtorInitializer {{.*}} 'f3c' 'volatile __mfp8'
63 //CHECK-NEXT: | | | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
64 //CHECK-NEXT: | | | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
65 //CHECK-NEXT: | | `-CompoundStmt {{.*}}
66 //CHECK-NEXT: | |-CXXMethodDecl {{.*}} func1c '__mfp8 (__mfp8)' implicit-inline
67 //CHECK-NEXT: | | |-ParmVarDecl {{.*}} arg '__mfp8'
68 //CHECK-NEXT: | | `-CompoundStmt {{.*}}
69 //CHECK-NEXT: | | `-ReturnStmt {{.*}}
70 //CHECK-NEXT: | | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
71 //CHECK-NEXT: | | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
72 //CHECK-NEXT: | `-CXXMethodDecl {{.*}} func2c '__mfp8 (__mfp8)' static implicit-inline
73 //CHECK-NEXT: | |-ParmVarDecl {{.*}} arg '__mfp8'
74 //CHECK-NEXT: | `-CompoundStmt {{.*}}
75 //CHECK-NEXT: | `-ReturnStmt {{.*}}
76 //CHECK-NEXT: | `-ImplicitCastExpr {{.*}} '__mfp8' <LValueToRValue>
77 //CHECK-NEXT: | `-DeclRefExpr {{.*}} '__mfp8' lvalue ParmVar {{.*}} 'arg' '__mfp8'
79 template <class C
> struct S1
{
83 template <> struct S1
<__mfp8
> {
87 //CHECK: |-TemplateArgument type '__mfp8'
88 //CHECK-NEXT: | `-BuiltinType {{.*}} '__mfp8'
89 //CHECK-NEXT: |-CXXRecordDecl {{.*}} implicit struct S1
90 //CHECK-NEXT: `-FieldDecl {{.*}} mem2 '__mfp8'