[clang] 4e53490 - [NFC][Docs] fix clang-docs compilation
Jonas Toth via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 24 04:13:56 PDT 2020
Author: Jonas Toth
Date: 2020-09-24T13:13:38+02:00
New Revision: 4e534900476d2a5c620e74ddb9c9e7d321e6d443
URL: https://github.com/llvm/llvm-project/commit/4e534900476d2a5c620e74ddb9c9e7d321e6d443
DIFF: https://github.com/llvm/llvm-project/commit/4e534900476d2a5c620e74ddb9c9e7d321e6d443.diff
LOG: [NFC][Docs] fix clang-docs compilation
Added:
Modified:
clang/docs/analyzer/checkers.rst
clang/include/clang/Basic/AttrDocs.td
Removed:
################################################################################
diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst
index dbbd49085dac..b47be97eef96 100644
--- a/clang/docs/analyzer/checkers.rst
+++ b/clang/docs/analyzer/checkers.rst
@@ -2545,6 +2545,7 @@ The goal of this rule is to make sure that any uncounted local variable is backe
These are examples of cases that we consider safe:
.. code-block:: cpp
+
void foo1() {
RefPtr<RefCountable> counted;
// The scope of uncounted is EMBEDDED in the scope of counted.
diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 3e27924589e4..753c4dd235fa 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -3509,7 +3509,7 @@ def SwiftBridgeDocs : Documentation {
The ``swift_bridge`` attribute indicates that the declaration to which the
attribute appertains is bridged to the named Swift type.
- .. code-block:: c
+ .. code-block:: objc
__attribute__((__objc_root__))
@interface Base
@@ -3535,7 +3535,7 @@ the attribute appertains is imported into Swift, it should refer to the bridged
Swift type (e.g. Swift's ``String``) rather than the Objective-C type as written
(e.g. ``NSString``).
- .. code-block:: c
+ .. code-block:: objc
@interface NSString;
typedef NSString *AliasedString __attribute__((__swift_bridged_typedef__));
@@ -3572,28 +3572,28 @@ the imported API. When calling the API, Swift will always pass a valid address
initialized to a null pointer.
* ``swift_error(none)`` means that the function should not be imported as
-throwing. The error parameter and result type will be imported normally.
+ throwing. The error parameter and result type will be imported normally.
* ``swift_error(null_result)`` means that calls to the function should be
-considered to have thrown if they return a null value. The return type must be
-a pointer type, and it will be imported into Swift with a non-optional type.
-This is the default error convention for Objective-C methods that return
-pointers.
+ considered to have thrown if they return a null value. The return type must be
+ a pointer type, and it will be imported into Swift with a non-optional type.
+ This is the default error convention for Objective-C methods that return
+ pointers.
* ``swift_error(zero_result)`` means that calls to the function should be
-considered to have thrown if they return a zero result. The return type must be
-an integral type. If the return type would have been imported as ``Bool``, it
-is instead imported as ``Void``. This is the default error convention for
-Objective-C methods that return a type that would be imported as ``Bool``.
+ considered to have thrown if they return a zero result. The return type must be
+ an integral type. If the return type would have been imported as ``Bool``, it
+ is instead imported as ``Void``. This is the default error convention for
+ Objective-C methods that return a type that would be imported as ``Bool``.
* ``swift_error(nonzero_result)`` means that calls to the function should be
-considered to have thrown if they return a non-zero result. The return type must
-be an integral type. If the return type would have been imported as ``Bool``,
-it is instead imported as ``Void``.
+ considered to have thrown if they return a non-zero result. The return type must
+ be an integral type. If the return type would have been imported as ``Bool``,
+ it is instead imported as ``Void``.
* ``swift_error(nonnull_error)`` means that calls to the function should be
-considered to have thrown if they leave a non-null error in the error parameter.
-The return type is left unmodified.
+ considered to have thrown if they leave a non-null error in the error parameter.
+ The return type is left unmodified.
}];
}
@@ -3611,7 +3611,7 @@ variable, or type. When renaming a function, the name may be a compound Swift
name. For a type, enum constant, property, or variable declaration, the name
must be a simple or qualified identifier.
- .. code-block:: c
+ .. code-block:: objc
@interface URL
- (void) initWithString:(NSString *)s __attribute__((__swift_name__("URL.init(_:)")))
More information about the cfe-commits
mailing list