[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 18 11:36:58 PST 2017
JonasToth added a comment.
What happens if the operator is overloaded outside a class? Is that allowed/disallowed and could you please mention the guideline on that in the docs + tests.
================
Comment at: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp:18
+
+AST_MATCHER(CXXMethodDecl, hasOverloadedOperator) {
+ if (Node.isCopyAssignmentOperator() || Node.isMoveAssignmentOperator())
----------------
I think `isOverloadedOperator` is a better name.
================
Comment at: clang-tidy/fuchsia/OverloadedOperatorCheck.h:19
+
+/// Operator overloading is disallowed.
+///
----------------
I think this comment could be rephrased to a better sentence. Maybe `Overloading operators is disallowed by the fuchsia coding standard.`?
================
Comment at: docs/clang-tidy/checks/fuchsia-overloaded-operator.rst:17
+
+See the features disallowed in Fuchsia at https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md
----------------
Could you make the link clickable?
https://reviews.llvm.org/D41363
More information about the cfe-commits
mailing list