[Lldb-commits] [lldb] r278373 - Modify coding conventions to mention include ordering.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 11 11:10:40 PDT 2016
Author: zturner
Date: Thu Aug 11 13:10:40 2016
New Revision: 278373
URL: http://llvm.org/viewvc/llvm-project?rev=278373&view=rev
Log:
Modify coding conventions to mention include ordering.
Modified:
lldb/trunk/www/lldb-coding-conventions.html
Modified: lldb/trunk/www/lldb-coding-conventions.html
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/lldb-coding-conventions.html?rev=278373&r1=278372&r2=278373&view=diff
==============================================================================
--- lldb/trunk/www/lldb-coding-conventions.html (original)
+++ lldb/trunk/www/lldb-coding-conventions.html Thu Aug 11 13:10:40 2016
@@ -34,7 +34,20 @@
<b>Important</b>: Where not explicitly outlined below, assume that the
<a href="http://llvm.org/docs/CodingStandards.html">LLVM Coding Conventions</a> are to be followed.
</p>
-
+ <h3>Include Order:</h3>
+ <p>LLDB follows <a href="http://llvm.org/docs/CodingStandards.html#include-style">LLVM's include order</a>,
+ with an addition for LLDB specific headers.</p>
+ <ol class="arabic simple" id="local-private-headers">
+ <span id="main-module-header"></span>
+ <li>Main Module Header</li>
+ <li>Local/Private Headers</li>
+ <li><code class="docutils literal"><span class="pre">lldb/...</span></code></li>
+ <li><code class="docutils literal"><span class="pre">llvm/...</span></code></li>
+ <li>System <code class="docutils literal"><span class="pre">#include</span></code>s</li>
+ </ol>
+ <p>If you encounter existing code that does not follow this ordering, it should not be
+ taken as an indication that it is ok to not use it. Instead, the surrounding ordering
+ should be fixed gradually and incrementally.</p>
<h3>Source code width:</h3>
<p>lldb does not follow the 80 character line restriction llvm imposes. In our
experience, trying to fit C++ code into an 80 character line results in code that
More information about the lldb-commits
mailing list