New issue
Advanced search Search tips

Issue 830338 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 828582



Sign in to add a comment

Clang ToT builds fail with new -Wself-assign warning

Project Member Reported by h...@chromium.org, Apr 9 2018

Issue description

For example from https://ci.chromium.org/buildbot/chromium.clang/ToTLinux/2099

../../base/containers/circular_deque_unittest.cc:168:5: error: explicitly assigning value of variable of type 'circular_deque<int>' to itself [-Werror,-Wself-assign]
  q = q;
  ~ ^ ~
 

Comment 1 by h...@chromium.org, Apr 9 2018

This is due to r329493

Let's see how widespread this is and whether they are false or true positives.

Comment 2 by h...@chromium.org, Apr 9 2018

Status: Started (was: Assigned)
Looks like 10-ish instances so far: https://chromium-review.googlesource.com/c/chromium/src/+/1000856
Project Member

Comment 3 by bugdroid1@chromium.org, Apr 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/792903fe9b253a845e7e7606d0cf1729a3e65575

commit 792903fe9b253a845e7e7606d0cf1729a3e65575
Author: Hans Wennborg <hans@chromium.org>
Date: Mon Apr 09 11:20:06 2018

Defeat Clang's enhanced -Wself-assign warning

In 329493, Clang's -Wself-assign warning started also firing on
overloaded assignment operators. The suggested way to suppress it is to
use *& on the right-hand side.

This fixes the instances that fire during a debug build on Linux.

TBR=jochen

Bug:  830338 
Change-Id: I5198ff8171462b78d55b84f58358588caf3f7fa2
Reviewed-on: https://chromium-review.googlesource.com/1000856
Commit-Queue: Hans Wennborg <hans@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549152}
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/base/containers/circular_deque_unittest.cc
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/base/memory/linked_ptr_unittest.cc
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/base/memory/ref_counted_unittest.cc
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/base/observer_list_unittest.cc
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/components/autofill/core/browser/autofill_profile_unittest.cc
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/components/autofill/core/browser/credit_card_unittest.cc
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/ppapi/tests/test_var.cc
[modify] https://crrev.com/792903fe9b253a845e7e7606d0cf1729a3e65575/url/gurl_unittest.cc

Comment 4 by h...@chromium.org, Apr 10 2018

Status: Fixed (was: Started)
I haven't seen any more of these.

Sign in to add a comment