diff --git a/clang/docs/InternalsManual.rst b/clang/docs/InternalsManual.rst index bbfcc54b6536261469d586e94cf1c63404ba500f..3a914170e22aa0d785572ec8020bc7d72afad479 100644 --- a/clang/docs/InternalsManual.rst +++ b/clang/docs/InternalsManual.rst @@ -525,7 +525,7 @@ the ``CharSourceRange`` class. The Driver Library ================== -The clang Driver and library are documented `here <DriverInternals.html>`_. +The clang Driver and library are documented :doc:`here <DriverInternals>`. Precompiled Headers =================== @@ -534,7 +534,7 @@ Clang supports two implementations of precompiled headers. The default implementation, precompiled headers (:doc:`PCH <PCHInternals>`) uses a serialized representation of Clang's internal data structures, encoded with the `LLVM bitstream format <http://llvm.org/docs/BitCodeFormat.html>`_. -Pretokenized headers (`PTH <PTHInternals.html>`_), on the other hand, contain a +Pretokenized headers (:doc:`PTH <PTHInternals>`), on the other hand, contain a serialized representation of the tokens encountered when preprocessing a header (and anything that header includes). diff --git a/clang/docs/JSONCompilationDatabase.rst b/clang/docs/JSONCompilationDatabase.rst index 51482648d5ff61b21c49698b8c27b000bda19498..c5852ebfb542bc84f7701e3d9a5c265ebf0ee833 100644 --- a/clang/docs/JSONCompilationDatabase.rst +++ b/clang/docs/JSONCompilationDatabase.rst @@ -34,7 +34,7 @@ of compilation databases for Unix Makefile builds (Ninja builds in the works) with the option ``CMAKE_EXPORT_COMPILE_COMMANDS``. Clang's tooling interface supports reading compilation databases; see -the `LibTooling documentation <LibTooling.html>`_. libclang and its +the :doc:`LibTooling documentation <LibTooling>`. libclang and its python bindings also support this (since clang 3.2); see `CXCompilationDatabase.h </doxygen/group__COMPILATIONDB.html>`_. diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst index c3e2c83d13018e7ffe93f829c1ddea60023275ce..be6ea52bf3d5895d5c1eff06c016688b4a766208 100644 --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -87,8 +87,8 @@ for support for non-standardized features, i.e. features not prefixed ``c_``, ``cxx_`` or ``objc_``. Another use of ``__has_feature`` is to check for compiler features not related -to the language standard, such as e.g. `AddressSanitizer -<AddressSanitizer.html>`_. +to the language standard, such as e.g. :doc:`AddressSanitizer +<AddressSanitizer>`. If the ``-pedantic-errors`` option is given, ``__has_extension`` is equivalent to ``__has_feature``. @@ -925,8 +925,8 @@ Use ``__has_feature(objc_instancetype)`` to determine whether the Automatic reference counting ---------------------------- -Clang provides support for `automated reference counting -<AutomaticReferenceCounting.html>`_ in Objective-C, which eliminates the need +Clang provides support for :doc:`automated reference counting +<AutomaticReferenceCounting>` in Objective-C, which eliminates the need for manual ``retain``/``release``/``autorelease`` message sends. There are two feature macros associated with automatic reference counting: ``__has_feature(objc_arc)`` indicates the availability of automated reference @@ -934,6 +934,8 @@ counting in general, while ``__has_feature(objc_arc_weak)`` indicates that automated reference counting also includes support for ``__weak`` pointers to Objective-C objects. +.. _objc-fixed-enum: + Enumerations with a fixed underlying type ----------------------------------------- @@ -1010,8 +1012,8 @@ management (autorelease). Object Literals and Subscripting -------------------------------- -Clang provides support for `Object Literals and Subscripting -<ObjectiveCLiterals.html>`_ in Objective-C, which simplifies common Objective-C +Clang provides support for :doc:`Object Literals and Subscripting +<ObjectiveCLiterals>` in Objective-C, which simplifies common Objective-C programming patterns, makes programs more concise, and improves the safety of container creation. There are several feature macros associated with object literals and subscripting: ``__has_feature(objc_array_literals)`` tests the diff --git a/clang/docs/LibASTMatchers.rst b/clang/docs/LibASTMatchers.rst index 56a1a7fa4bce2972349361e2ddee3956321f779c..738de79d5da6a499e5df96d203e2d1a8be84c376 100644 --- a/clang/docs/LibASTMatchers.rst +++ b/clang/docs/LibASTMatchers.rst @@ -7,9 +7,9 @@ nodes of the AST and execute code that uses the matched nodes. Combined with :doc:`LibTooling`, LibASTMatchers helps to write code-to-code transformation tools or query tools. -We assume basic knowledge about the Clang AST. See the `Introduction to the -Clang AST <IntroductionToTheClangAST.html>`_ if you want to learn more about -how the AST is structured. +We assume basic knowledge about the Clang AST. See the :doc:`Introduction +to the Clang AST <IntroductionToTheClangAST>` if you want to learn more +about how the AST is structured. .. FIXME: create tutorial and link to the tutorial @@ -52,7 +52,7 @@ AST matchers <astmatchers-writing>` later in this document. The precondition to using the matchers is to understand how the AST for what you want to match looks like. The -`Introduction to the Clang AST <IntroductionToTheClangAST.html>`_ teaches you +:doc:`Introduction to the Clang AST <IntroductionToTheClangAST>` teaches you how to dump a translation unit's AST into a human readable format. .. FIXME: Introduce link to ASTMatchersTutorial.html diff --git a/clang/docs/LibTooling.rst b/clang/docs/LibTooling.rst index 8c2a126fcc7a749dc31df41c50da5243da688713..b739aed14aa3204a77c9c3717c03d855600a7559 100644 --- a/clang/docs/LibTooling.rst +++ b/clang/docs/LibTooling.rst @@ -7,7 +7,7 @@ This document will provide a basic walkthrough of how to write a tool using LibTooling. For the information on how to setup Clang Tooling for LLVM see -`HowToSetupToolingForLLVM.html <HowToSetupToolingForLLVM.html>`_ +:doc:`HowToSetupToolingForLLVM` Introduction ------------ diff --git a/clang/docs/ObjectiveCLiterals.rst b/clang/docs/ObjectiveCLiterals.rst index 5fcb25f7f408ad0b1f153a180bbfc6f0d79e471e..92e4fb65cd293277fde479754d40d96cccd8146a 100644 --- a/clang/docs/ObjectiveCLiterals.rst +++ b/clang/docs/ObjectiveCLiterals.rst @@ -164,9 +164,7 @@ value: The expression ``@(AVAudioQualityMax)`` converts ``AVAudioQualityMax`` to an integer type, and boxes the value accordingly. If the enum has a -`fixed underlying -type <http://clang.llvm.org/docs/LanguageExtensions.html#objc_fixed_enum>`_ -as in: +:ref:`fixed underlying type <objc-fixed-enum>` as in: .. code-block:: objc @@ -178,8 +176,7 @@ then the fixed underlying type will be used to select the correct Boxing a value of enum type will result in a ``NSNumber`` pointer with a creation method according to the underlying type of the enum, which can -be a `fixed underlying -type <http://clang.llvm.org/docs/LanguageExtensions.html#objc_fixed_enum>`_ +be a :ref:`fixed underlying type <objc-fixed-enum>` or a compiler-defined integer type capable of representing the values of all the members of the enumeration: diff --git a/clang/docs/PCHInternals.rst b/clang/docs/PCHInternals.rst index bc73d7be37e6a8c414a675c76022507e0fb281a2..6fe53d931631c6f396de4d8af307c8223a1e9c15 100644 --- a/clang/docs/PCHInternals.rst +++ b/clang/docs/PCHInternals.rst @@ -7,7 +7,7 @@ Precompiled Header and Modules Internals This document describes the design and implementation of Clang's precompiled headers (PCH) and modules. If you are interested in the end-user view, please -see the `User's Manual <UsersManual.html#precompiledheaders>`_. +see the :ref:`User's Manual <usersmanual-precompiled-headers>`. Using Precompiled Headers with ``clang`` ---------------------------------------- diff --git a/clang/docs/Tooling.rst b/clang/docs/Tooling.rst index b2884b6710fd4b02c22fd43ddfdad6ecdadb7614..b1281fc09efb949344eafee3b003de5f9b59c1f7 100644 --- a/clang/docs/Tooling.rst +++ b/clang/docs/Tooling.rst @@ -33,7 +33,7 @@ Do not use LibClang when you...: Clang Plugins ------------- -`Clang Plugins <ClangPlugins.html>`_ allow you to run additional actions on the +:doc:`Clang Plugins <ClangPlugins>` allow you to run additional actions on the AST as part of a compilation. Plugins are dynamic libraries that are loaded at runtime by the compiler, and they're easy to integrate into your build environment. @@ -60,7 +60,7 @@ Do not use Clang Plugins when you...: LibTooling ---------- -`LibTooling <LibTooling.html>`_ is a C++ interface aimed at writing standalone +:doc:`LibTooling <LibTooling>` is a C++ interface aimed at writing standalone tools, as well as integrating into services that run clang tools. Canonical examples of when to use LibTooling: @@ -85,7 +85,7 @@ Do not use LibTooling when you...: Clang Tools ----------- -`Clang tools <ClangTools.html>`_ are a collection of specific developer tools +:doc:`Clang tools <ClangTools>` are a collection of specific developer tools built on top of the LibTooling infrastructure as part of the Clang project. They are targeted at automating and improving core development activities of C/C++ developers.