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:
https://reviews.llvm.org/D4136
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 uniq
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
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
clang-tidy/fuchsia/OverloadedOp
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
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
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
clang-tidy/fuchsia/Overloade
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 clickab
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
clang-tidy/fuchsia/OverloadedOp
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 `isOver
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: docs/clang-tidy/checks/fuchsia-overloaded-operator.
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
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.
13 matches
Mail list logo