]> granicus.if.org Git - clang/commitdiff
Fixing SPHINX warnings with incorrect indentations.
authorAaron Ballman <aaron@aaronballman.com>
Mon, 9 Nov 2015 15:24:09 +0000 (15:24 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Mon, 9 Nov 2015 15:24:09 +0000 (15:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252470 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/AttrDocs.td

index 8fda86590a67d72a2a68784e36845d3e791e80c7..61a39caae483653619aaabffbd67984ada8a38cd 100644 (file)
@@ -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;
+    };
 
   }];
 }