<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dcoughlin@apple.com" title="Devin Coughlin <dcoughlin@apple.com>"> <span class="fn">Devin Coughlin</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Static analyzer incorrectly models a synthesized assignment operator"
   href="https://llvm.org/bugs/show_bug.cgi?id=16745">bug 16745</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Static analyzer incorrectly models a synthesized assignment operator"
   href="https://llvm.org/bugs/show_bug.cgi?id=16745#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Static analyzer incorrectly models a synthesized assignment operator"
   href="https://llvm.org/bugs/show_bug.cgi?id=16745">bug 16745</a>
              from <span class="vcard"><a class="email" href="mailto:dcoughlin@apple.com" title="Devin Coughlin <dcoughlin@apple.com>"> <span class="fn">Devin Coughlin</span></a>
</span></b>
        <pre>This false positive no longer manifests and it looks like Sema was indeed
changed to create distinct DeclRefExprs for __i0. I'm going to mark this as
RESOLVED.

Here is an AST dump from ToT:
| `-CXXMethodDecl 0x7ffd2d869bd0 <col:8> col:8 implicit used operator= 'struct
B &(struct B &) noexcept(false)' inline
|   |-ParmVarDecl 0x7ffd2d869d00 <col:8> col:8 used 'struct B &'
|   `-CompoundStmt 0x7ffd2d86a378 <col:8>
|     |-BinaryOperator 0x7ffd2d869ee0 <col:8> 'int' lvalue '='
|     | |-MemberExpr 0x7ffd2d869e30 <col:8> 'int' lvalue ->a 0x7ffd2d84a9e0
|     | | `-CXXThisExpr 0x7ffd2d869e18 <col:8> 'struct B *' this
|     | `-ImplicitCastExpr 0x7ffd2d869ec8 <col:8> 'int' <LValueToRValue>
|     |   `-MemberExpr 0x7ffd2d869e90 <col:8> 'int' lvalue .a 0x7ffd2d84a9e0
|     |     `-DeclRefExpr 0x7ffd2d869e68 <col:8> 'struct B' lvalue ParmVar
0x7ffd2d869d00 '' 'struct B &'
|     |-ForStmt 0x7ffd2d86a2f0 <col:8>
|     | |-DeclStmt 0x7ffd2d869fa0 <col:8>
|     | | `-VarDecl 0x7ffd2d869f20 <col:8> col:8 used __i0 'unsigned long'
cinit
|     | |   `-IntegerLiteral 0x7ffd2d869f80 <col:8> 'unsigned long' 0
|     | |-<<<NULL>>>
|     | |-BinaryOperator 0x7ffd2d86a220 <col:8> '_Bool' '!='
|     | | |-ImplicitCastExpr 0x7ffd2d86a270 <col:8> 'unsigned long'
<LValueToRValue>
|     | | | `-DeclRefExpr 0x7ffd2d86a248 <col:8> 'unsigned long' lvalue Var
0x7ffd2d869f20 '__i0' 'unsigned long'
|     | | `-IntegerLiteral 0x7ffd2d86a288 <col:8> 'unsigned long' 1
|     | |-UnaryOperator 0x7ffd2d86a2a8 <col:8> 'unsigned long' lvalue prefix
'++'
|     | | `-DeclRefExpr 0x7ffd2d86a2c8 <col:8> 'unsigned long' lvalue Var
0x7ffd2d869f20 '__i0' 'unsigned long'
|     | `-CXXMemberCallExpr 0x7ffd2d86a1f0 <col:8> 'struct A' lvalue
|     |   |-MemberExpr 0x7ffd2d86a0c0 <col:8> '<bound member function type>'
.operator= 0x7ffd2d84a740
|     |   | `-ArraySubscriptExpr 0x7ffd2d86a088 <col:8> 'struct A' lvalue
|     |   |   |-ImplicitCastExpr 0x7ffd2d86a070 <col:8> 'struct A *'
<ArrayToPointerDecay>
|     |   |   | `-MemberExpr 0x7ffd2d869ff8 <col:8> 'struct A [1]' lvalue ->b
0x7ffd2d84ab58
|     |   |   |   `-CXXThisExpr 0x7ffd2d869fe0 <col:8> 'struct B *' this
|     |   |   `-ImplicitCastExpr 0x7ffd2d86a058 <col:8> 'unsigned long'
<LValueToRValue>
|     |   |     `-DeclRefExpr 0x7ffd2d86a030 <col:8> 'unsigned long' lvalue Var
0x7ffd2d869f20 '__i0' 'unsigned long'
|     |   `-ArraySubscriptExpr 0x7ffd2d86a1c8 <col:8> 'struct A' lvalue
|     |     |-ImplicitCastExpr 0x7ffd2d86a1b0 <col:8> 'struct A *'
<ArrayToPointerDecay>
|     |     | `-MemberExpr 0x7ffd2d86a138 <col:8> 'struct A [1]' lvalue .b
0x7ffd2d84ab58
|     |     |   `-DeclRefExpr 0x7ffd2d86a110 <col:8> 'struct B' lvalue ParmVar
0x7ffd2d869d00 '' 'struct B &'
|     |     `-ImplicitCastExpr 0x7ffd2d86a198 <col:8> 'unsigned long'
<LValueToRValue>
|     |       `-DeclRefExpr 0x7ffd2d86a170 <col:8> 'unsigned long' lvalue Var
0x7ffd2d869f20 '__i0' 'unsigned long'
|     `-ReturnStmt 0x7ffd2d86a360 <col:8>
|       `-UnaryOperator 0x7ffd2d86a340 <col:8> 'struct B' lvalue prefix '*'
|         `-CXXThisExpr 0x7ffd2d86a328 <col:8> 'struct B *' this</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>