blob: cec9e282f69df861ab3134196b147b3bda66023d [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
13// CHECK: define void @_ZN1N1X1fEv
Rafael Espindolaf4187652013-02-14 01:18:37 +000014
15extern "C" {
16 static void test2_f() {
17 }
Rafael Espindola46d2b6b2013-02-14 03:31:26 +000018 // This is not required by the standard, but users assume they know
19 // the mangling of static functions in extern "C" contexts.
20 // CHECK: define internal void @test2_f(
Rafael Espindolaf4187652013-02-14 01:18:37 +000021 void test2_use() {
22 test2_f();
Rafael Espindolaf4187652013-02-14 01:18:37 +000023 }
24}
Rafael Espindola3e0e33d2013-02-14 15:38:59 +000025
26extern "C" {
27 struct test3_s {
28 };
29 bool operator==(const int& a, const test3_s& b) {
30 }
31}