In C++17 the operand(s) of an overloaded operator are sequenced as for the corresponding built-in operator when the overloaded operator is called with the operator notation ([over.match.oper]p2).
Reported in PR35340.
Paths
| Differential D81330
[clang] SequenceChecker: C++17 sequencing rule for overloaded operators. ClosedPublic Authored by riccibruno on Jun 6 2020, 5:06 AM.
Details Summary In C++17 the operand(s) of an overloaded operator are sequenced as for the corresponding built-in operator when the overloaded operator is called with the operator notation ([over.match.oper]p2). Reported in PR35340.
Diff Detail
Event Timelinericcibruno retitled this revision from [clang][Sema] SequenceChecker: C++17 sequencing rule for overloaded operators. to [clang] SequenceChecker: C++17 sequencing rule for overloaded operators..Jun 11 2020, 3:19 AM Comment Actions It would be nice to avoid the duplication between the builtin and overloaded cases here, but I don't see a good way to do that. LGTM. This revision is now accepted and ready to land.Jun 16 2020, 5:20 PM Closed by commit rGf5bbe390d23d: [clang] SequenceChecker: C++17 sequencing rule for overloaded operators. (authored by riccibruno). · Explain WhyJun 20 2020, 3:40 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 272249 clang/lib/Sema/SemaChecking.cpp
clang/test/SemaCXX/warn-unsequenced.cpp
|