This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: New ARI warning Wed Apr 5 01:59:13 UTC 2017
- From: Pedro Alves <palves at redhat dot com>
- To: GDB Administrator <gdbadmin at sourceware dot org>, gdb-patches at sourceware dot org
- Date: Wed, 5 Apr 2017 13:03:56 +0100
- Subject: Re: New ARI warning Wed Apr 5 01:59:13 UTC 2017
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 09DAC3DBD7
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 09DAC3DBD7
- References: <20170405015913.GA58571@sourceware.org>
The problems quoted below all false positives. The ARI doesn't know
about C++11 syntax. :-/
On 04/05/2017 02:59 AM, GDB Administrator wrote:
> 88a89,90
>> gdb/common/gdb_optional.h:78: code: OP eol: Do not use &&, or || at the end of a line
> gdb/common/gdb_optional.h:78: T &&operator* () &&
>> gdb/common/gdb_optional.h:81: code: OP eol: Do not use &&, or || at the end of a line
> gdb/common/gdb_optional.h:81: constexpr const T &&operator* () const &&
The "&&" at the end of the declaration means that those methods are
rvalue reference overloads.
> 90a93
>> gdb/common/underlying.h:27: code: function call in first column: Function name in first column should be restricted to function implementation
> gdb/common/underlying.h:27:to_underlying (E val) noexcept
> 172d174
And this _is_ the implementation. Maybe it's the "noexcept" at the
end of the line that confuses the ARI.
Thanks,
Pedro Alves