summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CodingStandards.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/CodingStandards.rst')
-rw-r--r--llvm/docs/CodingStandards.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/docs/CodingStandards.rst b/llvm/docs/CodingStandards.rst
index feb3bf0eb03..6ed7a95c9f0 100644
--- a/llvm/docs/CodingStandards.rst
+++ b/llvm/docs/CodingStandards.rst
@@ -494,8 +494,8 @@ for it (vs something else, like 90 columns).
This is one of many contentious issues in coding standards, but it is not up for
debate.
-Use Spaces Instead of Tabs
-^^^^^^^^^^^^^^^^^^^^^^^^^^
+Whitespace
+^^^^^^^^^^
In all cases, prefer spaces to tabs in source files. People have different
preferred indentation levels, and different styles of indentation that they
@@ -509,6 +509,12 @@ indentation, **DO NOT** do that in the middle of a chunk of code with two spaces
of indentation. Also, do not reindent a whole source file: it makes for
incredible diffs that are absolutely worthless.
+Do not commit changes that include trailing whitespace. If you find trailing
+whitespace in a file, do not remove it unless you're otherwise changing that
+line of code. Some common editors will automatically remove trailing whitespace
+when saving a file which causes unrelated changes to appear in diffs and
+commits.
+
Indent Code Consistently
^^^^^^^^^^^^^^^^^^^^^^^^
OpenPOWER on IntegriCloud