[llvm-bugs] [Bug 41661] New: Missing -Wself-assign (-field) for struct member self assignments

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 29 15:02:20 PDT 2019


            Bug ID: 41661
           Summary: Missing -Wself-assign (-field) for struct member self
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: dcoughlin at apple.com
          Reporter: david.bolvansky at gmail.com
                CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org

Tested with current Clang trunk.

struct A {
    int b;

void selfassign(struct A *a, struct A *b, int n)
  a->b = a->b; // Sadly, no warning (typo, should be b->b)
  n = n; // Clang warns

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190429/45e9dfe2/attachment.html>

More information about the llvm-bugs mailing list