[PATCH] D23404: Clarify suggestion to use "#if 0" ... "#endif" for large blocks of comments

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 08:01:29 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL278932: Clarify the statement on using #if 0 ... #endif in CodingStandards. (authored by asbokhan).

Changed prior to commit:
  https://reviews.llvm.org/D23404?vs=68353&id=68355#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23404

Files:
  llvm/trunk/docs/CodingStandards.rst

Index: llvm/trunk/docs/CodingStandards.rst
===================================================================
--- llvm/trunk/docs/CodingStandards.rst
+++ llvm/trunk/docs/CodingStandards.rst
@@ -309,8 +309,10 @@
 #. When writing a source file that is used by a tool that only accepts C style
    comments.
 
-To comment out a large block of code, use ``#if 0`` and ``#endif``. These nest
-properly and are better behaved in general than C style comments.
+Commenting out large blocks of code is discouraged, but if you really have to do
+this (for documentation purposes or as a suggestion for debug printing), use
+``#if 0`` and ``#endif``. These nest properly and are better behaved in general
+than C style comments.
 
 Doxygen Use in Documentation Comments
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23404.68355.patch
Type: text/x-patch
Size: 800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160817/5976a9bd/attachment.bin>


More information about the llvm-commits mailing list