[PATCH] D18442: A clang-tidy check for std:accumulate.

Clement Courbet via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 26 00:59:16 PDT 2016


courbet added inline comments.

================
Comment at: docs/clang-tidy/checks/misc-fold-init-type.rst:16-17
@@ +15,4 @@
+
+.. code:: c++
+  auto a = {0.5f, 0.5f, 0.5f, 0.5f};
+  return std::accumulate(std::begin(a), std::end(a), 0);
----------------
alexfh wrote:
> Prazek wrote:
> > Doesn't .. code node need new line?
> Yes, it needs a new-line. Also, please verify the documentation actually builds with sphinx. On Ubuntu it should boil down to these commands:
> 
>   $ sudo apt-get install python-sphinx
>   $ mkdir -p /some/build/directory && cd /some/build/directory
>   $ cmake /path/to/llvm/ -DLLVM_ENABLE_SPHINX=ON
>   $ make docs-clang-tools-html
> 
Thanks for the catch.

================
Comment at: docs/clang-tidy/checks/misc-fold-init-type.rst:16-17
@@ +15,4 @@
+
+.. code:: c++
+  auto a = {0.5f, 0.5f, 0.5f, 0.5f};
+  return std::accumulate(std::begin(a), std::end(a), 0);
----------------
courbet wrote:
> alexfh wrote:
> > Prazek wrote:
> > > Doesn't .. code node need new line?
> > Yes, it needs a new-line. Also, please verify the documentation actually builds with sphinx. On Ubuntu it should boil down to these commands:
> > 
> >   $ sudo apt-get install python-sphinx
> >   $ mkdir -p /some/build/directory && cd /some/build/directory
> >   $ cmake /path/to/llvm/ -DLLVM_ENABLE_SPHINX=ON
> >   $ make docs-clang-tools-html
> > 
> Thanks for the catch.
Thanks.


http://reviews.llvm.org/D18442





More information about the cfe-commits mailing list