YouCompleteMe/cpp/llvm/tools/clang/test/CodeGenCXX/virtual-function-calls.cpp
Strahinja Val Markovic 1f51a89d39 Adding more llvm/clang files
These were ignored by git accidentally. We want ALL OF THEM since they all came
in the llvm/clang source distribution.
2012-07-05 17:55:45 -07:00

39 lines
413 B
C++

// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
// PR5021
namespace PR5021 {
struct A {
virtual void f(char);
};
void f(A *a) {
// CHECK: call void %
a->f('c');
}
struct B : virtual A {
virtual void f();
};
void f(B * b) {
b->f();
}
}
namespace Test1 {
struct A {
virtual ~A();
};
struct B : A {
virtual ~B();
virtual void f();
};
void f(B *b) {
b->f();
}
}