1// 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};
17