[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 3 07:48:07 PDT 2018


lebedev.ri updated this revision to Diff 140787.
lebedev.ri added a comment.

- Rebased
- Silence both of the diagnostics in an unevaluated context.
- Fixed `-Wself-assign-field` preexisting problems:
  - False-positives on `volatile` stores.
  - Do not warn in template instantiations.
  - Handle all the macro cases (do not warn)
- +Tests

I'm going to run it on some project next.


Repository:
  rC Clang

https://reviews.llvm.org/D44883

Files:
  docs/ReleaseNotes.rst
  lib/Sema/SemaExpr.cpp
  test/SemaCXX/member-init.cpp
  test/SemaCXX/warn-self-assign-builtin.cpp
  test/SemaCXX/warn-self-assign-field-builtin.cpp
  test/SemaCXX/warn-self-assign-field-overloaded.cpp
  test/SemaCXX/warn-self-assign-overloaded.cpp
  test/SemaCXX/warn-self-assign.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44883.140787.patch
Type: text/x-patch
Size: 17623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180403/3b5fe9e5/attachment-0001.bin>


More information about the cfe-commits mailing list