From: Aaron Ballman Date: Mon, 9 Nov 2015 15:24:09 +0000 (+0000) Subject: Fixing SPHINX warnings with incorrect indentations. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eda0676beeb85c24a026477cc2de45870e14a84a;p=clang Fixing SPHINX warnings with incorrect indentations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252470 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td index 8fda86590a..61a39caae4 100644 --- a/include/clang/Basic/AttrDocs.td +++ b/include/clang/Basic/AttrDocs.td @@ -1628,44 +1628,44 @@ The ``not_tail_called`` attribute prevents tail-call optimization on statically For example, it prevents tail-call optimization in the following case: .. code-block: c - int __attribute__((not_tail_called)) foo1(int); + int __attribute__((not_tail_called)) foo1(int); - int foo2(int a) { - return foo1(a); // No tail-call optimization on direct calls. - } + int foo2(int a) { + return foo1(a); // No tail-call optimization on direct calls. + } However, it doesn't prevent tail-call optimization in this case: .. code-block: c - int __attribute__((not_tail_called)) foo1(int); + int __attribute__((not_tail_called)) foo1(int); - int foo2(int a) { - int (*fn)(int) = &foo1; + int foo2(int a) { + int (*fn)(int) = &foo1; - // not_tail_called has no effect on an indirect call even if the call can be - // resolved at compile time. - return (*fn)(a); - } + // not_tail_called has no effect on an indirect call even if the call can be + // resolved at compile time. + return (*fn)(a); + } Marking virtual functions as ``not_tail_called`` is an error: .. code-block: c++ - class Base { - public: - // not_tail_called on a virtual function is an error. - [[clang::not_tail_called]] virtual int foo1(); + class Base { + public: + // not_tail_called on a virtual function is an error. + [[clang::not_tail_called]] virtual int foo1(); - virtual int foo2(); + virtual int foo2(); - // Non-virtual functions can be marked ``not_tail_called``. - [[clang::not_tail_called]] int foo3(); - }; + // Non-virtual functions can be marked ``not_tail_called``. + [[clang::not_tail_called]] int foo3(); + }; - class Derived1 : public Base { - public: - int foo1() override; + class Derived1 : public Base { + public: + int foo1() override; - // not_tail_called on a virtual function is an error. - [[clang::not_tail_called]] int foo2() override; - }; + // not_tail_called on a virtual function is an error. + [[clang::not_tail_called]] int foo2() override; + }; }]; }