[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-bugs
Subject:    [llvm-bugs] [Bug 50940] New: Consider warning on redundant attributes
From:       via llvm-bugs <llvm-bugs () lists ! llvm ! org>
Date:       2021-06-30 12:56:49
Message-ID: bug-50940-206 () http ! bugs ! llvm ! org/
[Download RAW message or body]

--1625057809.efDaA4c41.18384
Date: Wed, 30 Jun 2021 05:56:49 -0700
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.llvm.org/
Auto-Submitted: auto-generated

https://bugs.llvm.org/show_bug.cgi?id=50940

            Bug ID: 50940
           Summary: Consider warning on redundant attributes
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs@nondot.org
          Reporter: nicolasweber@gmx.de
                CC: llvm-bugs@lists.llvm.org, neeilans@live.com,
                    richard-llvm@metafoo.co.uk

clang currently allows this without complaint:

    [[nodiscard]] [[nodiscard]] int f() { return 4; }

The duplicate `[[nodiscard]]` is harmless, but also pointless and a copy-paste
artifact. We should maybe warn on it.

We very likely shouldn't warn if one `[[nodiscard]]` is on the decl and another
on the definition.

We possibly shouldn't warn on it if one of the copies comes from a macro.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
--1625057809.efDaA4c41.18384
Date: Wed, 30 Jun 2021 05:56:49 -0700
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://bugs.llvm.org/
Auto-Submitted: auto-generated

<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Consider warning on redundant attributes"
   href="https://bugs.llvm.org/show_bug.cgi?id=50940">50940</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Consider warning on redundant attributes
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs&#64;nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber&#64;gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs&#64;lists.llvm.org, neeilans&#64;live.com, richard-llvm&#64;metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clang currently allows this without complaint:

    [[nodiscard]] [[nodiscard]] int f() { return 4; }

The duplicate `[[nodiscard]]` is harmless, but also pointless and a copy-paste
artifact. We should maybe warn on it.

We very likely shouldn't warn if one `[[nodiscard]]` is on the decl and another
on the definition.

We possibly shouldn't warn on it if one of the copies comes from a macro.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>
--1625057809.efDaA4c41.18384--

[Attachment #3 (text/plain)]

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic