Fix a pair of array index checks.
[oota-llvm.git] / docs / CodingStandards.rst
index 3bf62514a9db3ba644b9b8cf44e867a55a7291fa..b454e49664f093568995090b42e1d89160c85199 100644 (file)
@@ -195,6 +195,13 @@ A documentation comment that uses all Doxygen features in a preferred way:
   /// \returns true on success.
   bool fooBar(bool Baz, StringRef Quux, std::vector<int> &Result);
 
+Don't duplicate the documentation comment in the header file and in the
+implementation file.  Put the documentation comments for public APIs into the
+header file.  Documentation comments for private APIs can go to the
+implementation file.  In any case, implementation files can include additional
+comments (not necessarily in Doxygen markup) to explain implementation details
+as needed.
+
 Don't duplicate function or class name at the beginning of the comment.
 For humans it is obvious which function or class is being documented;
 automatic documentation processing tools are smart enough to bind the comment
@@ -837,7 +844,7 @@ Here are more examples:
 
 .. code-block:: c++
 
-  assert(Ty->isPointerType() && "Can't allocate a non pointer type!");
+  assert(Ty->isPointerType() && "Can't allocate a non-pointer type!");
 
   assert((Opcode == Shl || Opcode == Shr) && "ShiftInst Opcode invalid!");