blob: a7d018d58dfd2245ae43c30c12cb64592c1247dc [file] [log] [blame]
Fariborz Jahanianacdfa7a2010-04-20 22:02:31 +00001// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
2// pr6644
3
4extern "C" {
5 namespace N {
6 struct X {
7 virtual void f();
8 };
9 void X::f() { }
10 }
11}
12
Rafael Espindola34970692013-12-12 16:07:11 +000013// CHECK-LABEL: define {{.*}}void @_ZN1N1X1fEv
Rafael Espindolaf4187652013-02-14 01:18:37 +000014
15extern "C" {
16 static void test2_f() {
17 }
Stephen Lin43622612013-08-15 06:47:53 +000018 // CHECK-LABEL: define internal void @_Z7test2_fv
Rafael Espindola16c8cf02013-02-23 00:26:28 +000019 static void test2_f(int x) {
20 }
Stephen Lin43622612013-08-15 06:47:53 +000021 // CHECK-LABEL: define internal void @_Z7test2_fi
Rafael Espindolaf4187652013-02-14 01:18:37 +000022 void test2_use() {
23 test2_f();
Rafael Espindola16c8cf02013-02-23 00:26:28 +000024 test2_f(42);
Rafael Espindolaf4187652013-02-14 01:18:37 +000025 }
26}
Rafael Espindola3e0e33d2013-02-14 15:38:59 +000027
28extern "C" {
29 struct test3_s {
30 };
31 bool operator==(const int& a, const test3_s& b) {
32 }
33}