summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/virtual-function-calls.cpp
blob: 0b3a684301eb216bd97a04ee5dc4c24d2af707ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s

// 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();
}
OpenPOWER on IntegriCloud