[DI] When checking class inits for uses of self, ignore strong_retain.
[DI] When checking class inits for uses of self, ignore strong_retain.

This specific issue came up due to my SILGen changes for copy_value,
destroy_value. Specifically, we used to emit the diagnostic:

  super.init isn't called on all paths before returning from initializer.

After my change, we began to emit:

  'self' used before super.init call

Since the code was:

  init() {}

there is clearly no use, so the new error is incorrect or at minimum
misleading. When I investigated why the change in diagnostic happened, it was
because as a result of my SILGen change, the order of the strong_retain and
return in the use-list swapped in the following code:

  %1 = load %0 : $*MultipleInitDerived
  strong_retain %1 : $MultipleInitDerived
  return %1 : $MultipleInitDerived

Before my change, return was visited first, causing the correct diagnostic to be
emitted. After my change, the strong_retain is visited first causing the second
diagnostic to be emitted. Since we only emit one source error for each
SILLocation, in the 2nd case, the error associated with the return is not
emitted.

We should not be considering strong_retain to be a use that propagates
liveness. The reason why is that a strong_retain should always be paired with
some local use that consumes it, whether that is an apply, closure, or a store
into memory. Since we will always have a consuming operation for the retain and
the consuming operation actually is able to be something visible at the source
level to the user (versus the retain), it makes more sense to just ignore
strong_retain.

In general though, we should try to be more careful about how we swallow errors
in DI, especially in the light of use-list twiddling. I attempted to improve our
testing situation by added a flag '-definite-init-visit-debuginfo-locs' that
would cause DI to consider SIL Location debug info locs when deciding whether or
not to swallow errors. Sadly, our diagnostics (from what I can tell) do not
support emitting diagnositics for such locations, so I failed.

Thus I could not actually test this, but it will fail once I get in the
copy_value, destroy_value change, so that /should/ act as good enough of a test.

rdar://28851920

codestergit/swift,roambotics/swift,lorentey/swift,hooman/swift,CodaFi/swift,gribozavr/swift,brentdax/swift,jtbandes/swift,frootloops/swift,amraboelela/swift,zisko/swift,apple/swift,danielmartin/swift,xwu/swift,harlanhaskins/swift,amraboelela/swift,airspeedswift/swift,gribozavr/swift,jopamer/swift,roambotics/swift,milseman/swift,therealbnut/swift,aschwaighofer/swift,djwbrown/swift,jckarter/swift,parkera/swift,ahoppen/swift,ben-ng/swift,Jnosh/swift,JGiola/swift,djwbrown/swift,tinysun212/swift-windows,calebd/swift,rudkx/swift,stephentyrone/swift,danielmartin/swift,ahoppen/swift,shahmishal/swift,gribozavr/swift,OscarSwanros/swift,arvedviehweger/swift,rudkx/swift,shajrawi/swift,jopamer/swift,atrick/swift,tinysun212/swift-windows,shahmishal/swift,natecook1000/swift,swiftix/swift,nathawes/swift,lorentey/swift,airspeedswift/swift,benlangmuir/swift,austinzheng/swift,gregomni/swift,rudkx/swift,natecook1000/swift,milseman/swift,gregomni/swift,frootloops/swift,gregomni/swift,devincoughlin/swift,allevato/swift,tkremenek/swift,return/swift,tinysun212/swift-windows,jckarter/swift,tkremenek/swift,ahoppen/swift,therealbnut/swift,CodaFi/swift,tardieu/swift,alblue/swift,practicalswift/swift,JGiola/swift,hughbe/swift,jopamer/swift,roambotics/swift,tinysun212/swift-windows,arvedviehweger/swift,manavgabhawala/swift,atrick/swift,OscarSwanros/swift,Jnosh/swift,practicalswift/swift,gribozavr/swift,brentdax/swift,deyton/swift,sschiau/swift,hooman/swift,apple/swift,aschwaighofer/swift,bitjammer/swift,brentdax/swift,xedin/swift,bitjammer/swift,uasys/swift,shahmishal/swift,karwa/swift,allevato/swift,swiftix/swift,shahmishal/swift,JaSpa/swift,calebd/swift,kstaring/swift,swiftix/swift,allevato/swift,austinzheng/swift,zisko/swift,hooman/swift,JaSpa/swift,apple/swift,airspeedswift/swift,tjw/swift,karwa/swift,tkremenek/swift,parkera/swift,benlangmuir/swift,tardieu/swift,harlanhaskins/swift,austinzheng/swift,gottesmm/swift,allevato/swift,lorentey/swift,nathawes/swift,kstaring/swift,zisko/swift,jckarter/swift,felix91gr/swift,brentdax/swift,karwa/swift,gmilos/swift,xwu/swift,JaSpa/swift,natecook1000/swift,gregomni/swift,milseman/swift,OscarSwanros/swift,xedin/swift,gottesmm/swift,lorentey/swift,rudkx/swift,glessard/swift,Jnosh/swift,danielmartin/swift,CodaFi/swift,zisko/swift,devincoughlin/swift,sschiau/swift,kstaring/swift,calebd/swift,jtbandes/swift,arvedviehweger/swift,codestergit/swift,shahmishal/swift,shajrawi/swift,austinzheng/swift,arvedviehweger/swift,uasys/swift,brentdax/swift,sschiau/swift,stephentyrone/swift,sschiau/swift,aschwaighofer/swift,uasys/swift,xwu/swift,nathawes/swift,jmgc/swift,alblue/swift,ben-ng/swift,calebd/swift,gottesmm/swift,gribozavr/swift,ahoppen/swift,devincoughlin/swift,xedin/swift,gribozavr/swift,codestergit/swift,codestergit/swift,alblue/swift,aschwaighofer/swift,devincoughlin/swift,kstaring/swift,brentdax/swift,parkera/swift,karwa/swift,benlangmuir/swift,swiftix/swift,ben-ng/swift,shajrawi/swift,jopamer/swift,zisko/swift,shajrawi/swift,sschiau/swift,milseman/swift,JaSpa/swift,bitjammer/swift,jckarter/swift,aschwaighofer/swift,xwu/swift,stephentyrone/swift,practicalswift/swift,gottesmm/swift,deyton/swift,stephentyrone/swift,felix91gr/swift,codestergit/swift,swiftix/swift,djwbrown/swift,kstaring/swift,ahoppen/swift,ben-ng/swift,deyton/swift,deyton/swift,parkera/swift,lorentey/swift,devincoughlin/swift,huonw/swift,benlangmuir/swift,gmilos/swift,JaSpa/swift,harlanhaskins/swift,brentdax/swift,JaSpa/swift,nathawes/swift,shajrawi/swift,arvedviehweger/swift,alblue/swift,alblue/swift,roambotics/swift,devincoughlin/swift,uasys/swift,huonw/swift,natecook1000/swift,practicalswift/swift,gmilos/swift,danielmartin/swift,xwu/swift,frootloops/swift,aschwaighofer/swift,hughbe/swift,tjw/swift,hughbe/swift,jtbandes/swift,shahmishal/swift,bitjammer/swift,hooman/swift,natecook1000/swift,JaSpa/swift,tjw/swift,parkera/swift,amraboelela/swift,jmgc/swift,danielmartin/swift,shahmishal/swift,calebd/swift,JGiola/swift,glessard/swift,practicalswift/swift,kstaring/swift,deyton/swift,hooman/swift,return/swift,amraboelela/swift,huonw/swift,allevato/swift,atrick/swift,benlangmuir/swift,harlanhaskins/swift,alblue/swift,glessard/swift,hughbe/swift,hughbe/swift,harlanhaskins/swift,devincoughlin/swift,gottesmm/swift,glessard/swift,sschiau/swift,gregomni/swift,uasys/swift,felix91gr/swift,jmgc/swift,karwa/swift,OscarSwanros/swift,airspeedswift/swift,swiftix/swift,gribozavr/swift,djwbrown/swift,manavgabhawala/swift,Jnosh/swift,arvedviehweger/swift,glessard/swift,atrick/swift,huonw/swift,natecook1000/swift,hughbe/swift,manavgabhawala/swift,austinzheng/swift,stephentyrone/swift,return/swift,harlanhaskins/swift,arvedviehweger/swift,gribozavr/swift,therealbnut/swift,deyton/swift,xedin/swift,ben-ng/swift,therealbnut/swift,manavgabhawala/swift,CodaFi/swift,djwbrown/swift,bitjammer/swift,karwa/swift,Jnosh/swift,kstaring/swift,huonw/swift,jckarter/swift,return/swift,tkremenek/swift,CodaFi/swift,rudkx/swift,manavgabhawala/swift,JGiola/swift,allevato/swift,tkremenek/swift,alblue/swift,jtbandes/swift,jtbandes/swift,apple/swift,xedin/swift,jmgc/swift,apple/swift,amraboelela/swift,therealbnut/swift,devincoughlin/swift,glessard/swift,atrick/swift,CodaFi/swift,tardieu/swift,milseman/swift,shajrawi/swift,gottesmm/swift,manavgabhawala/swift,tardieu/swift,tinysun212/swift-windows,tjw/swift,shahmishal/swift,tardieu/swift,ben-ng/swift,airspeedswift/swift,xedin/swift,frootloops/swift,felix91gr/swift,gregomni/swift,airspeedswift/swift,allevato/swift,bitjammer/swift,atrick/swift,gottesmm/swift,frootloops/swift,stephentyrone/swift,codestergit/swift,parkera/swift,lorentey/swift,JGiola/swift,jmgc/swift,jtbandes/swift,practicalswift/swift,manavgabhawala/swift,jckarter/swift,benlangmuir/swift,codestergit/swift,huonw/swift,jmgc/swift,felix91gr/swift,Jnosh/swift,jmgc/swift,JGiola/swift,rudkx/swift,jopamer/swift,hooman/swift,zisko/swift,danielmartin/swift,natecook1000/swift,uasys/swift,shajrawi/swift,tardieu/swift,jopamer/swift,nathawes/swift,lorentey/swift,shajrawi/swift,xwu/swift,gmilos/swift,return/swift,tkremenek/swift,roambotics/swift,tinysun212/swift-windows,amraboelela/swift,practicalswift/swift,xedin/swift,tinysun212/swift-windows,return/swift,ahoppen/swift,felix91gr/swift,gmilos/swift,uasys/swift,swiftix/swift,tjw/swift,hooman/swift,danielmartin/swift,therealbnut/swift,OscarSwanros/swift,zisko/swift,xwu/swift,milseman/swift,parkera/swift,apple/swift,Jnosh/swift,jckarter/swift,calebd/swift,hughbe/swift,aschwaighofer/swift,tjw/swift,austinzheng/swift,djwbrown/swift,felix91gr/swift,harlanhaskins/swift,jopamer/swift,bitjammer/swift,djwbrown/swift,OscarSwanros/swift,milseman/swift,tkremenek/swift,practicalswift/swift,airspeedswift/swift,karwa/swift,frootloops/swift,austinzheng/swift,huonw/swift,gmilos/swift,sschiau/swift,return/swift,calebd/swift,frootloops/swift,sschiau/swift,jtbandes/swift,tjw/swift,gmilos/swift,tardieu/swift,nathawes/swift,nathawes/swift,stephentyrone/swift,ben-ng/swift,CodaFi/swift,parkera/swift,deyton/swift,roambotics/swift,xedin/swift,karwa/swift,lorentey/swift,amraboelela/swift,OscarSwanros/swift,therealbnut/swift