[PATCH] D40108: [clang-tidy] Adding Fuchsia checkers to clang-tidy

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 29 06:40:57 PST 2017


alexfh added a comment.

A couple of late comments.



================
Comment at: clang-tidy/fuchsia/DefaultArgumentsCheck.cpp:39
+      return;
+    } else if (DefaultArgRange.getBegin().isMacroID()) {
+      diag(D->getLocStart(),
----------------
No `else` after `return`, please. http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return


================
Comment at: clang-tidy/fuchsia/DefaultArgumentsCheck.cpp:56
+          "declaring a parameter with a default argument is disallowed")
+          << D
+          << FixItHint::CreateRemoval(RemovalRange);
----------------
This argument is not used in the message. Does it have any effect at all?


================
Comment at: docs/clang-tidy/index.rst:64
 ``clang-analyzer-``    Clang Static Analyzer checks.
+``fuchsia-``           Checks related to Fuchsia coding conventions.
 ``google-``            Checks related to Google coding conventions.
----------------
How about adding a link to the coding style document? (We should do this for other entries here, but that's unrelated to your patch.)


https://reviews.llvm.org/D40108





More information about the cfe-commits mailing list