xref: /llvm-project/clang/test/SemaCXX/attr-notail.cpp (revision 4500f0a7321d75a061d09d92987b522e9cc09517)
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 
4 class Base {
5 public:
6   [[clang::not_tail_called]] virtual int foo1();
7   virtual int foo2();
8   [[clang::not_tail_called]] int foo3();
~Base()9   virtual ~Base() {}
10 };
11 
12 class Derived1 : public Base {
13 public:
14   int foo1() override;
15   [[clang::not_tail_called]] int foo2() override;
16   [[clang::not_tail_called]] int foo4();
17 };
18