[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / SemaCXX / ms-empty_bases.cpp
blob69d9e2799b8ff2b515e37ef8ed9e224aef629c4d
1 // RUN: %clang_cc1 -triple i386-pc-win32 %s -fsyntax-only -verify -fms-extensions -Wno-microsoft -std=c++11
3 struct __declspec(empty_bases) S {};
4 enum __declspec(empty_bases) E {}; // expected-warning{{'empty_bases' attribute only applies to classes}}
5 int __declspec(empty_bases) I; // expected-warning{{'empty_bases' attribute only applies to classes}}
6 typedef struct T __declspec(empty_bases) U; // expected-warning{{'empty_bases' attribute only applies to classes}}
7 auto z = []() __declspec(empty_bases) { return nullptr; }; // expected-warning{{'empty_bases' attribute only applies to classes}}
9 struct __declspec(empty_bases(1)) X {}; // expected-error{{'empty_bases' attribute takes no arguments}}