]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGenCXX/anonymous-namespaces.cpp
Updaet clang to 92395.
[FreeBSD/FreeBSD.git] / test / CodeGenCXX / anonymous-namespaces.cpp
1 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2
3 namespace {
4   // CHECK: @_ZN12_GLOBAL__N_11aE = internal global i32 0
5   int a = 0;
6
7   // CHECK: define internal i32 @_ZN12_GLOBAL__N_13fooEv()
8   int foo() {
9     return 32;
10   }
11
12   // CHECK: define internal i32 @_ZN12_GLOBAL__N_11A3fooEv()
13   namespace A {
14     int foo() {
15       return 45;
16     }
17   }
18 }
19
20 int concrete() {
21   return a + foo() + A::foo();
22 }