// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s

struct A {
  virtual int operator-() = 0;
};

void f(A *a) {
  // CHECK: call i32 %
  -*a;
}

// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s

struct A {
  virtual int operator-();
};

void f(A a, A *ap) {
  // CHECK: call i32 @_ZN1AngEv(%struct.A* %a)
  -a;

  // CHECK: call i32 %
  -*ap;
}

Add a test for devirtualization of virtual operator calls.
Add a test for devirtualization of virtual operator calls.

There was no test coverage for this before: Modifiying
EmitCXXOperatorMemberCallee() to not call CanDevirtualizeMemberFunctionCall()
didn't make any test fail.


git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@223056 91177308-0d34-0410-b5e6-96231b3b80d8
