From 8d28646db6ca328b2e33fee74d1aebee0f5a6966 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Fri, 14 Jun 2013 15:14:20 +0000 Subject: [PATCH] cpp11-migrate: Fixing section markup Adhering to LLVM's ReST style for section markup. llvm-svn: 183981 --- clang-tools-extra/docs/AddOverrideTransform.rst | 4 ++-- clang-tools-extra/docs/LoopConvertTransform.rst | 14 +++++++------- clang-tools-extra/docs/MigratorUsage.rst | 4 ++-- clang-tools-extra/docs/UseAutoTransform.rst | 2 +- clang-tools-extra/docs/cpp11-migrate.rst | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/clang-tools-extra/docs/AddOverrideTransform.rst b/clang-tools-extra/docs/AddOverrideTransform.rst index 03f9494e23f9..2b2142b339eb 100644 --- a/clang-tools-extra/docs/AddOverrideTransform.rst +++ b/clang-tools-extra/docs/AddOverrideTransform.rst @@ -26,7 +26,7 @@ For example: }; Using Expands-to-Override Macros --------------------------------- +================================ Like LLVM's ``LLVM_OVERRIDE``, several projects have macros that conditionally expand to the ``override`` keyword when compiling with C++11 features enabled. @@ -37,7 +37,7 @@ Migrator to enable this behavior. Known Limitations ------------------ +================= * This transform will not insert the override keyword if a method is pure. At the moment it's not possible to track down the pure specifier location. diff --git a/clang-tools-extra/docs/LoopConvertTransform.rst b/clang-tools-extra/docs/LoopConvertTransform.rst index e6f877d74050..1579d6b77b38 100644 --- a/clang-tools-extra/docs/LoopConvertTransform.rst +++ b/clang-tools-extra/docs/LoopConvertTransform.rst @@ -18,7 +18,7 @@ Risk ==== Risky -^^^^^ +----- In loops where the container expression is more complex than just a reference to a declared expression (a variable, function, enum, etc.), @@ -44,7 +44,7 @@ for an example of an incorrect transformation when the maximum acceptable risk level is set to `risky`. Reasonable (Default) -^^^^^^^^^^^^^^^^^^^^ +-------------------- If a loop calls ``.end()`` or ``.size()`` after each iteration, the transformation for that loop is marked as `reasonable`, and thus will @@ -58,7 +58,7 @@ be converted if the acceptable risk level is set to ``-risk=reasonable`` cout << container[i]; Safe -^^^^ +---- Any other loops that do not match the above criteria to be marked as `risky` or `reasonable` are marked `safe`, and thus will be converted @@ -129,7 +129,7 @@ should be aware of the behaviour and limitations of the transform outlined by the cases below. Comments inside loop headers -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +---------------------------- Comments inside the original loop header are ignored and deleted when transformed. @@ -139,7 +139,7 @@ transformed. for (int i = 0; i < N; /* This will be deleted */ ++i) { } Range-based loops evaluate end() only once -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +------------------------------------------ The C++11 range-based for loop calls ``.end()`` only once during the initialization of the loop. If in the original loop ``.end()`` is called after @@ -205,7 +205,7 @@ transformed loop if ``.end()`` was originally called after each iteration. } Overloaded operator->() with side effects -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +----------------------------------------- Similarly, if ``operator->()`` was overloaded to have side effects, such as logging, the semantics will change. If the iterator's ``operator->()`` was used @@ -225,7 +225,7 @@ performed. } Pointers and references to containers -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +------------------------------------- While most of the transform's risk analysis is dedicated to determining whether the iterator or container was modified within the loop, it is possible to diff --git a/clang-tools-extra/docs/MigratorUsage.rst b/clang-tools-extra/docs/MigratorUsage.rst index 5c762bd661a4..04edd5a007e4 100644 --- a/clang-tools-extra/docs/MigratorUsage.rst +++ b/clang-tools-extra/docs/MigratorUsage.rst @@ -10,7 +10,7 @@ relative to the current directory. At least one transform must be enabled. General Command Line Options ----------------------------- +============================ .. option:: -help @@ -88,7 +88,7 @@ General Command Line Options replacements. Transform-Specific Command Line Options ---------------------------------------- +======================================= .. option:: -loop-convert diff --git a/clang-tools-extra/docs/UseAutoTransform.rst b/clang-tools-extra/docs/UseAutoTransform.rst index a322f512981c..44d50018dee6 100644 --- a/clang-tools-extra/docs/UseAutoTransform.rst +++ b/clang-tools-extra/docs/UseAutoTransform.rst @@ -131,7 +131,7 @@ following conditions are satisfied: deduced as``std::initializer_list``. Known Limitations ------------------ +================= * If the initializer is an explicit conversion constructor, the transform will not replace the type specifier even though it would be safe to do so. * User-defined iterators are not handled at this time. diff --git a/clang-tools-extra/docs/cpp11-migrate.rst b/clang-tools-extra/docs/cpp11-migrate.rst index bba4df11fe6d..9afe72f5194f 100644 --- a/clang-tools-extra/docs/cpp11-migrate.rst +++ b/clang-tools-extra/docs/cpp11-migrate.rst @@ -18,7 +18,7 @@ C++98 and C++03 code to use features of the new C++11 standard where appropriate. Getting Started ---------------- +=============== To build from source: @@ -70,7 +70,7 @@ unless ``-final-syntax-check`` is enabled. .. _Clang Tools Documentation: http://clang.llvm.org/docs/ClangTools.html Getting Involved ----------------- +================ If you find a bug @@ -101,7 +101,7 @@ be completed. .. _transforms: Transformations ---------------- +=============== The Migrator is a collection of independent transforms which can be independently enabled. The transforms currently implemented are: