[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-22 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL321363: [clang-tidy] Adding Fuchsia checker for overloaded operators (authored by juliehockett, committed by ). Herald added a subscriber: klimek. Changed prior to commit:

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-22 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D41363#962727, @juliehockett wrote: > > Are the Fuchsia library headers intended to also comply with this rule? I > > notice there's mention of a

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-21 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added a comment. > Are the Fuchsia library headers intended to also comply with this rule? I > notice there's mention of a unique_ptr class, and I can't imagine that > working without overloading more operators than just assignment. Perhaps this > check should not be triggered for

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-21 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 127960. juliehockett marked 5 inline comments as done. juliehockett added a comment. Fixing comments https://reviews.llvm.org/D41363 Files: clang-tidy/fuchsia/CMakeLists.txt clang-tidy/fuchsia/FuchsiaTidyModule.cpp

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Are the Fuchsia library headers intended to also comply with this rule? I notice there's mention of a unique_ptr class, and I can't imagine that working without overloading more operators than just assignment. Perhaps this check should not be triggered for system

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-21 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. 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 juliehockett wrote: > JonasToth wrote: > > Could you

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-20 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 127806. juliehockett added a comment. Updating matcher to include overloaded operators outside classes. https://reviews.llvm.org/D41363 Files: clang-tidy/fuchsia/CMakeLists.txt clang-tidy/fuchsia/FuchsiaTidyModule.cpp

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-20 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. 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 JonasToth wrote: > Could you make the link

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-20 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 127799. juliehockett marked 7 inline comments as done. juliehockett added a comment. Fixing comments https://reviews.llvm.org/D41363 Files: clang-tidy/fuchsia/CMakeLists.txt clang-tidy/fuchsia/FuchsiaTidyModule.cpp

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/OverloadedOperatorCheck.cpp:18 + +AST_MATCHER(CXXMethodDecl, hasOverloadedOperator) { + if (Node.isCopyAssignmentOperator() || Node.isMoveAssignmentOperator()) JonasToth wrote: > I think

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:141 + + Warns if an operator is overloaded, except for the copy and move operators. + assignment operators? Comment at:

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-18 Thread Jonas Toth via Phabricator via cfe-commits
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 +

[PATCH] D41363: [clang-tidy] Adding Fuchsia checker for overloaded operators

2017-12-18 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: aaron.ballman, alexfh, hokein. juliehockett added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Adds a check to the Fuchsia module to warn if an operator is overloaded, except move and copy operators.