]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenCXX/mangle-local-anonymous-unions.cpp
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
[FreeBSD/FreeBSD.git] / test / CodeGenCXX / mangle-local-anonymous-unions.cpp
1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
2
3 // CHECK-DAG: @_ZZ2f0vE1a
4 // CHECK-DAG: @_ZZ2f0vE1c
5 // CHECK-DAG: @_ZZ2f0vE1e_0
6 inline int f0() {
7   static union {
8     int a;
9     long int b;
10   };
11
12   static union {
13     int c;
14     double d;
15   };
16
17   if (0) {
18     static union {
19       int e;
20       int f;
21     };
22   }
23   static union {
24     int e;
25     int f;
26   };
27
28   return a+c;
29 }
30
31 inline void nop() {
32   static union {
33     union {
34     };
35   };
36 }
37
38 int f1 (int a, int c) {
39   nop();
40   return a+c+f0();
41 }
42