aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/dynamic-cast-dead.cpp
blob: 8154cc1ba123aa93f7c05e1d08128813c7bb0f98 (plain)
1
2
3
4
5
6
7
8
// RUN: %clang_cc1 -I%S %s -O3 -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s
struct A { virtual ~A(); };
struct B : A { };

void foo(A* a) {
  // CHECK-NOT: call {{.*}} @__dynamic_cast
  B* b = dynamic_cast<B*>(a);
}