[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / pr47636.cpp
blob28c2b7802fe6b0f39dedfb035b37706dd88969fe
1 // RUN: %clang_cc1 %s -ast-dump | FileCheck %s
3 int(&&intu_rvref)[] {1,2,3,4};
4 // CHECK: VarDecl 0x[[GLOB_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit
5 // CHECK-NEXT: ExprWithCleanups {{.*}} 'int[4]' xvalue
6 // CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int[4]' xvalue extended by Var 0x[[GLOB_ADDR]] 'intu_rvref' 'int (&&)[4]'
7 // CHECK-NEXT: InitListExpr {{.*}} 'int[4]'
9 // CHECK: FunctionDecl {{.*}} static_const
10 void static_const() {
11 static const int(&&intu_rvref)[] {1,2,3,4};
12 // CHECK: VarDecl 0x[[STATIC_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'const int (&&)[4]' static listinit
13 // CHECK-NEXT: ExprWithCleanups {{.*}} 'const int[4]' xvalue
14 // CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'const int[4]' xvalue extended by Var 0x[[STATIC_ADDR]] 'intu_rvref' 'const int (&&)[4]'
15 // CHECK-NEXT: InitListExpr {{.*}} 'const int[4]'
18 // CHECK: FunctionDecl {{.*}} const_expr
19 constexpr int const_expr() {
20 int(&&intu_rvref)[]{1, 2, 3, 4};
21 // CHECK: VarDecl 0x[[CE_ADDR:[0-9a-f]+]] {{.*}} intu_rvref 'int (&&)[4]' listinit
22 // CHECK-NEXT: ExprWithCleanups {{.*}} 'int[4]' xvalue
23 // CHECK-NEXT: MaterializeTemporaryExpr {{.*}} 'int[4]' xvalue extended by Var 0x[[CE_ADDR]] 'intu_rvref' 'int (&&)[4]'
24 // CHECK-NEXT: InitListExpr {{.*}} 'int[4]'
25 return intu_rvref[0];