[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / SemaCXX / virtual-override-x64.cpp
blobf3eaf11569c8f7454b82e85ecf7518f0d8d241de
1 // RUN: %clang_cc1 -triple=x86_64-pc-unknown -fsyntax-only -verify %s
3 // Non-x86 targets ignore the calling conventions by default (but will warn
4 // when one is encountered), so we want to make sure the virtual overrides
5 // continue to work.
6 namespace PR14339 {
7 class A {
8 public:
9 virtual void __attribute__((thiscall)) f(); // expected-warning {{'thiscall' calling convention is not supported for this target}}
12 class B : public A {
13 public:
14 void __attribute__((cdecl)) f();
17 class C : public A {
18 public:
19 void __attribute__((thiscall)) f(); // expected-warning {{'thiscall' calling convention is not supported for this target}}
22 class D : public A {
23 public:
24 void f();
27 class E {
28 public:
29 virtual void __attribute__((stdcall)) g(); // expected-warning {{'stdcall' calling convention is not supported for this target}}
32 class F : public E {
33 public:
34 void g();