blob: 2f39746dc85bcb7e67e2aaa118036d46aed86ad1 [file] [log] [blame]
Akira Hatanakac8667622015-11-06 23:56:15 +00001// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2
3class Base {
4public:
5 [[clang::not_tail_called]] virtual int foo1(); // expected-error {{'not_tail_called' attribute cannot be applied to virtual functions}}
6 virtual int foo2();
7 [[clang::not_tail_called]] int foo3();
8 virtual ~Base() {}
9};
10
11class Derived1 : public Base {
12public:
13 int foo1() override;
14 [[clang::not_tail_called]] int foo2() override; // expected-error {{'not_tail_called' attribute cannot be applied to virtual functions}}
15 [[clang::not_tail_called]] int foo4();
16};