Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
LLVM project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Panda
LLVM project
Commits
1cd43464
Commit
1cd43464
authored
2 years ago
by
Krystian Kuzniarek
Committed by
owenca
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[clang-format][docs] Fix incorrect 'clang-format 11' option markers
Differential Revision:
https://reviews.llvm.org/D122064
parent
5520e07f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
clang/docs/ClangFormatStyleOptions.rst
+9
-6
9 additions, 6 deletions
clang/docs/ClangFormatStyleOptions.rst
clang/include/clang/Format/Format.h
+6
-6
6 additions, 6 deletions
clang/include/clang/Format/Format.h
with
15 additions
and
12 deletions
clang/docs/ClangFormatStyleOptions.rst
+
9
−
6
View file @
1cd43464
...
...
@@ -894,7 +894,7 @@ the configuration (without a prefix: ``Auto``).
int d,
int e);
**AllowShortBlocksOnASingleLine** (``ShortBlockStyle``) :versionbadge:`clang-format
11
`
**AllowShortBlocksOnASingleLine** (``ShortBlockStyle``) :versionbadge:`clang-format
3.5
`
Dependent on the value, ``while (true) { continue; }`` can be put on a
single line.
...
...
@@ -1658,6 +1658,7 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++
false: true:
int f() vs. int f()
{} {
}
...
...
@@ -1669,6 +1670,7 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++
false: true:
class Foo vs. class Foo
{} {
}
...
...
@@ -1680,6 +1682,7 @@ the configuration (without a prefix: ``Auto``).
.. code-block:: c++
false: true:
namespace Foo vs. namespace Foo
{} {
}
...
...
@@ -2418,7 +2421,7 @@ the configuration (without a prefix: ``Auto``).
f(MyMap[{composite, key}]); f(MyMap[{ composite, key }]);
new int[3]{1, 2, 3}; new int[3]{ 1, 2, 3 };
**DeriveLineEnding** (``Boolean``) :versionbadge:`clang-format 1
1
`
**DeriveLineEnding** (``Boolean``) :versionbadge:`clang-format 1
0
`
Analyze the formatted file for the most used line ending (``\r\n``
or ``\n``). ``UseCRLF`` is only used as a fallback if none can be derived.
...
...
@@ -4295,7 +4298,7 @@ the configuration (without a prefix: ``Auto``).
true: false:
for (auto v : values) {} vs. for(auto v: values) {}
**SpaceBeforeSquareBrackets** (``Boolean``) :versionbadge:`clang-format 1
1
`
**SpaceBeforeSquareBrackets** (``Boolean``) :versionbadge:`clang-format 1
0
`
If ``true``, spaces will be before ``[``.
Lambdas will not be affected. Only the first ``[`` will get a space added.
...
...
@@ -4305,7 +4308,7 @@ the configuration (without a prefix: ``Auto``).
int a [5]; vs. int a[5];
int a [5][5]; vs. int a[5][5];
**SpaceInEmptyBlock** (``Boolean``) :versionbadge:`clang-format 1
1
`
**SpaceInEmptyBlock** (``Boolean``) :versionbadge:`clang-format 1
0
`
If ``true``, spaces will be inserted into ``{}``.
.. code-block:: c++
...
...
@@ -4379,7 +4382,7 @@ the configuration (without a prefix: ``Auto``).
true: false:
x = ( int32 )y vs. x = (int32)y
**SpacesInConditionalStatement** (``Boolean``) :versionbadge:`clang-format 1
1
`
**SpacesInConditionalStatement** (``Boolean``) :versionbadge:`clang-format 1
0
`
If ``true``, spaces will be inserted around if/for/switch/while
conditions.
...
...
@@ -4543,7 +4546,7 @@ the configuration (without a prefix: ``Auto``).
For example: OpenSSL STACK_OF, BSD LIST_ENTRY.
**UseCRLF** (``Boolean``) :versionbadge:`clang-format 1
1
`
**UseCRLF** (``Boolean``) :versionbadge:`clang-format 1
0
`
Use ``\r\n`` instead of ``\n`` for line breaks.
Also used as fallback if ``DeriveLineEnding`` is true.
...
...
This diff is collapsed.
Click to expand it.
clang/include/clang/Format/Format.h
+
6
−
6
View file @
1cd43464
...
...
@@ -462,7 +462,7 @@ struct FormatStyle {
/// Dependent on the value, ``while (true) { continue; }`` can be put on a
/// single line.
/// \version
11
/// \version
3.5
ShortBlockStyle
AllowShortBlocksOnASingleLine
;
/// If ``true``, short case labels will be contracted to a single line.
...
...
@@ -1929,7 +1929,7 @@ struct FormatStyle {
/// \brief Analyze the formatted file for the most used line ending (``\r\n``
/// or ``\n``). ``UseCRLF`` is only used as a fallback if none can be derived.
/// \version 1
1
/// \version 1
0
bool
DeriveLineEnding
;
/// If ``true``, analyze the formatted file for the most common
...
...
@@ -3577,7 +3577,7 @@ struct FormatStyle {
/// void f() { } vs. void f() {}
/// while (true) { } while (true) {}
/// \endcode
/// \version 1
1
/// \version 1
0
bool
SpaceInEmptyBlock
;
/// If ``true``, spaces may be inserted into ``()``.
...
...
@@ -3640,7 +3640,7 @@ struct FormatStyle {
/// if ( a ) { ... } vs. if (a) { ... }
/// while ( i < 5 ) { ... } while (i < 5) { ... }
/// \endcode
/// \version 1
1
/// \version 1
0
bool
SpacesInConditionalStatement
;
/// If ``true``, spaces are inserted inside container literals (e.g.
...
...
@@ -3727,7 +3727,7 @@ struct FormatStyle {
/// int a [5]; vs. int a[5];
/// int a [5][5]; vs. int a[5][5];
/// \endcode
/// \version 1
1
/// \version 1
0
bool
SpaceBeforeSquareBrackets
;
/// Styles for adding spacing around ``:`` in bitfield definitions.
...
...
@@ -3834,7 +3834,7 @@ struct FormatStyle {
/// \brief Use ``\r\n`` instead of ``\n`` for line breaks.
/// Also used as fallback if ``DeriveLineEnding`` is true.
/// \version 1
1
/// \version 1
0
bool
UseCRLF
;
/// The way to use tab characters in the resulting file.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment