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

Andrey Bokhanko via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 07:57:51 PDT 2016


andreybokhanko retitled this revision from "Remove suggestion to use "#if 0" ... "#endif" for large blocks of comments" to "Clarify suggestion to use "#if 0" ... "#endif" for large blocks of comments".
andreybokhanko updated the summary for this revision.
andreybokhanko updated this revision to Diff 68353.
andreybokhanko added a comment.

Chris, Chandler, thank you for the review!

Patch updated.


https://reviews.llvm.org/D23404

Files:
  docs/CodingStandards.rst

Index: docs/CodingStandards.rst
===================================================================
--- docs/CodingStandards.rst
+++ 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.68353.patch
Type: text/x-patch
Size: 767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160817/3dd3cd12/attachment.bin>


More information about the llvm-commits mailing list