[PATCH] D16962: clang-tidy: avoid std::bind

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue May 3 07:10:54 PDT 2016


alexfh added a comment.

Please regenerate the patch with the full context (see http://llvm.org/docs/Phabricator.html).


================
Comment at: clang-tidy/readability/AvoidStdBindCheck.cpp:77
@@ +76,3 @@
+  for (size_t I = 1; I <= PlaceholderCount; ++I) {
+    Stream << Delimiter << "auto &&"
+           << " arg" << I;
----------------
clang-format, please.

================
Comment at: clang-tidy/readability/AvoidStdBindCheck.cpp:116
@@ +115,3 @@
+void AvoidStdBindCheck::check(const MatchFinder::MatchResult &Result) {
+  if (!getLangOpts().CPlusPlus14) // Need C++14 for generic lambdas.
+    return;
----------------
This should be done in `registerMatchers` instead.

================
Comment at: docs/clang-tidy/checks/readability-avoid-std-bind.rst:13
@@ +12,3 @@
+
+.. code:: C++
+  int add(int x, int y) { return x + y; }
----------------
`.. code::` should be followed by an empty line.

Please also verify the documentation can be built without errors. On Ubuntu this boils down to:

1. Install sphinx:

    $ sudo apt-get install sphinx-common

2. Enable `LLVM_BUILD_DOCS` and maybe some other options in cmake.

3. `ninja docs-clang-tools-html` (or something similar, if you use make).


http://reviews.llvm.org/D16962





More information about the cfe-commits mailing list