1 | // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s |
2 | |
3 | class Base { |
4 | public: |
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 | |
11 | class Derived1 : public Base { |
12 | public: |
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 | |