summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/c-linkage.cpp
blob: cec9e282f69df861ab3134196b147b3bda66023d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
// pr6644

extern "C" {
  namespace N {
    struct X { 
      virtual void f();
    };
    void X::f() { }
  }
}

// CHECK: define void @_ZN1N1X1fEv

extern "C" {
  static void test2_f() {
  }
  // This is not required by the standard, but users assume they know
  // the mangling of static functions in extern "C" contexts.
  // CHECK: define internal void @test2_f(
  void test2_use() {
    test2_f();
  }
}

extern "C" {
  struct test3_s {
  };
  bool operator==(const int& a, const test3_s& b)  {
  }
}
OpenPOWER on IntegriCloud