summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CodingStandards.rst
diff options
context:
space:
mode:
authorPaul Robinson <paul_robinson@playstation.sony.com>2015-01-22 00:19:56 +0000
committerPaul Robinson <paul_robinson@playstation.sony.com>2015-01-22 00:19:56 +0000
commit343e4964733d0063de2551a93d912b93880cada9 (patch)
tree00b8135cafb560dc716076f2a716366c48e3ae08 /llvm/docs/CodingStandards.rst
parent3ad99f0f2e36227c25dcda084e01b6d9c1124934 (diff)
downloadbcm5719-llvm-343e4964733d0063de2551a93d912b93880cada9.tar.gz
bcm5719-llvm-343e4964733d0063de2551a93d912b93880cada9.zip
Explicitly describe '///' versus '//' comment delimiters.
llvm-svn: 226750
Diffstat (limited to 'llvm/docs/CodingStandards.rst')
-rw-r--r--llvm/docs/CodingStandards.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/docs/CodingStandards.rst b/llvm/docs/CodingStandards.rst
index 0552c7117e2..f5e07bd499d 100644
--- a/llvm/docs/CodingStandards.rst
+++ b/llvm/docs/CodingStandards.rst
@@ -251,7 +251,8 @@ The next section in the file is a concise note that defines the license that the
file is released under. This makes it perfectly clear what terms the source
code can be distributed under and should not be modified in any way.
-The main body is a ``doxygen`` comment describing the purpose of the file. It
+The main body is a ``doxygen`` comment (identified by the ``///`` comment
+marker instead of the usual ``//``) describing the purpose of the file. It
should have a ``\brief`` command that describes the file in one or two
sentences. Any additional information should be separated by a blank line. If
an algorithm is being implemented or something tricky is going on, a reference
@@ -281,7 +282,8 @@ happens: does the method return null? Abort? Format your hard disk?
Comment Formatting
^^^^^^^^^^^^^^^^^^
-In general, prefer C++ style (``//``) comments. They take less space, require
+In general, prefer C++ style comments (``//`` for normal comments, ``///`` for
+``doxygen`` documentation comments). They take less space, require
less typing, don't have nesting problems, etc. There are a few cases when it is
useful to use C style (``/* */``) comments however:
OpenPOWER on IntegriCloud