[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / ms-novtable.cpp
blob31975b3b4a8441e76fed326f8bdf38986523fc3e
1 // RUN: %clang_cc1 -triple i386-pc-win32 %s -fsyntax-only -verify -fms-extensions -Wno-microsoft -std=c++11
3 struct __declspec(novtable) S {};
4 enum __declspec(novtable) E {}; // expected-warning{{'novtable' attribute only applies to classes}}
5 int __declspec(novtable) I; // expected-warning{{'novtable' attribute only applies to classes}}
6 typedef struct T __declspec(novtable) U; // expected-warning{{'novtable' attribute only applies to classes}}
7 auto z = []() __declspec(novtable) { return nullptr; }; // expected-warning{{'novtable' attribute only applies to classes}}