[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / CodeGenCXX / c-linkage.cpp
blob0f4c3277253f72dcc8a25fe79be3e381fbe6b55a
1 // RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
2 // pr6644
4 extern "C" {
5 namespace N {
6 struct X {
7 virtual void f();
8 };
9 void X::f() { }
13 // CHECK-LABEL: define {{.*}}void @_ZN1N1X1fEv
15 extern "C" {
16 static void test2_f() {
18 // CHECK-LABEL: define internal {{.*}}void @_ZL7test2_fv
19 static void test2_f(int x) {
21 // CHECK-LABEL: define internal {{.*}}void @_ZL7test2_fi
22 void test2_use() {
23 test2_f();
24 test2_f(42);
28 extern "C" {
29 struct test3_s {
31 bool operator==(const int& a, const test3_s& b) {