[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / pr27030.cpp
blob3b0938695fe3edaa33ecbc3f7b802792e49c3923
1 // RUN: %clang_cc1 -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s
2 struct A {};
3 struct B : A {};
4 extern "C" {
5 extern int B::*a;
6 void test1() { (int A::*)(a); }
8 // CHECK-LABEL: define dso_local void @test1(
9 // CHECK: %[[load:.*]] = load i32, ptr @a
10 // CHECK: %[[memptr_cmp:.*]] = icmp ne i32 %[[load]], -1
11 // CHECK: br i1 %[[memptr_cmp]]
13 // CHECK: %[[adj:.*]] = sub nsw i32 %[[load]], 0
14 // CHECK: %[[nv_adj:.*]] = select i1 true, i32 %[[adj]], i32 0
16 // CHECK: %[[memptr_converted:.*]] = phi i32 [ -1, {{.*}} ], [ %[[nv_adj]], {{.*}} ]