This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New ARI warning Wed Apr 5 01:59:13 UTC 2017


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]