fix a couple of bugs flagged by clang warnings, and use SmallVector in insertStringRef instead of a VLA since C++ doesn't have VLAs.
fix a couple of bugs flagged by clang warnings, and use SmallVector
in insertStringRef instead of a VLA since C++ doesn't have VLAs.


Swift SVN r3991

mightydeveloper/swift,alblue/swift,lorentey/swift,amraboelela/swift,aschwaighofer/swift,parkera/swift,therealbnut/swift,russbishop/swift,parkera/swift,amraboelela/swift,natecook1000/swift,harlanhaskins/swift,stephentyrone/swift,felix91gr/swift,JaSpa/swift,emilstahl/swift,KrishMunot/swift,LeoShimonaka/swift,bitjammer/swift,felix91gr/swift,hooman/swift,therealbnut/swift,return/swift,CodaFi/swift,Ivacker/swift,calebd/swift,brentdax/swift,xedin/swift,hooman/swift,Ivacker/swift,Jnosh/swift,arvedviehweger/swift,cbrentharris/swift,sdulal/swift,xwu/swift,milseman/swift,Ivacker/swift,deyton/swift,IngmarStein/swift,shajrawi/swift,natecook1000/swift,airspeedswift/swift,sschiau/swift,glessard/swift,ahoppen/swift,ben-ng/swift,OscarSwanros/swift,sschiau/swift,russbishop/swift,SwiftAndroid/swift,dduan/swift,jopamer/swift,kstaring/swift,practicalswift/swift,hughbe/swift,shahmishal/swift,shahmishal/swift,hooman/swift,swiftix/swift,manavgabhawala/swift,rudkx/swift,frootloops/swift,roambotics/swift,jopamer/swift,zisko/swift,MukeshKumarS/Swift,parkera/swift,ahoppen/swift,therealbnut/swift,emilstahl/swift,JGiola/swift,allevato/swift,codestergit/swift,xedin/swift,jckarter/swift,cbrentharris/swift,airspeedswift/swift,tkremenek/swift,huonw/swift,benlangmuir/swift,adrfer/swift,devincoughlin/swift,kperryua/swift,nathawes/swift,zisko/swift,Ivacker/swift,swiftix/swift,swiftix/swift.old,IngmarStein/swift,hughbe/swift,atrick/swift,airspeedswift/swift,tjw/swift,parkera/swift,milseman/swift,slavapestov/swift,johnno1962d/swift,Jnosh/swift,danielmartin/swift,slavapestov/swift,deyton/swift,rudkx/swift,kstaring/swift,shahmishal/swift,johnno1962d/swift,huonw/swift,codestergit/swift,KrishMunot/swift,cbrentharris/swift,alblue/swift,milseman/swift,kstaring/swift,shajrawi/swift,calebd/swift,gregomni/swift,arvedviehweger/swift,kperryua/swift,uasys/swift,bitjammer/swift,kentya6/swift,swiftix/swift.old,lorentey/swift,gmilos/swift,tardieu/swift,nathawes/swift,OscarSwanros/swift,tinysun212/swift-windows,karwa/swift,danielmartin/swift,sdulal/swift,arvedviehweger/swift,dduan/swift,uasys/swift,felix91gr/swift,russbishop/swift,devincoughlin/swift,djwbrown/swift,shajrawi/swift,roambotics/swift,atrick/swift,frootloops/swift,alblue/swift,jtbandes/swift,xwu/swift,modocache/swift,austinzheng/swift,jmgc/swift,tjw/swift,codestergit/swift,deyton/swift,slavapestov/swift,SwiftAndroid/swift,OscarSwanros/swift,danielmartin/swift,glessard/swift,kusl/swift,glessard/swift,kentya6/swift,manavgabhawala/swift,SwiftAndroid/swift,deyton/swift,kusl/swift,ken0nek/swift,gribozavr/swift,rudkx/swift,lorentey/swift,JaSpa/swift,kperryua/swift,sschiau/swift,gottesmm/swift,airspeedswift/swift,kentya6/swift,gottesmm/swift,Ivacker/swift,djwbrown/swift,jtbandes/swift,kentya6/swift,modocache/swift,benlangmuir/swift,felix91gr/swift,sschiau/swift,nathawes/swift,johnno1962d/swift,tinysun212/swift-windows,KrishMunot/swift,xedin/swift,IngmarStein/swift,lorentey/swift,dreamsxin/swift,mightydeveloper/swift,tkremenek/swift,karwa/swift,emilstahl/swift,dduan/swift,LeoShimonaka/swift,kusl/swift,LeoShimonaka/swift,gmilos/swift,uasys/swift,emilstahl/swift,roambotics/swift,MukeshKumarS/Swift,gottesmm/swift,felix91gr/swift,IngmarStein/swift,xedin/swift,tardieu/swift,benlangmuir/swift,stephentyrone/swift,bitjammer/swift,CodaFi/swift,jopamer/swift,tinysun212/swift-windows,tinysun212/swift-windows,tjw/swift,atrick/swift,ben-ng/swift,shahmishal/swift,austinzheng/swift,xwu/swift,apple/swift,russbishop/swift,shahmishal/swift,modocache/swift,adrfer/swift,harlanhaskins/swift,shajrawi/swift,atrick/swift,apple/swift,devincoughlin/swift,kusl/swift,glessard/swift,modocache/swift,khizkhiz/swift,Jnosh/swift,sschiau/swift,xedin/swift,jmgc/swift,swiftix/swift,djwbrown/swift,stephentyrone/swift,cbrentharris/swift,tjw/swift,tardieu/swift,djwbrown/swift,sschiau/swift,manavgabhawala/swift,nathawes/swift,uasys/swift,xwu/swift,slavapestov/swift,gmilos/swift,khizkhiz/swift,devincoughlin/swift,austinzheng/swift,tkremenek/swift,khizkhiz/swift,gottesmm/swift,allevato/swift,glessard/swift,return/swift,harlanhaskins/swift,adrfer/swift,johnno1962d/swift,jopamer/swift,jtbandes/swift,IngmarStein/swift,JGiola/swift,stephentyrone/swift,practicalswift/swift,dduan/swift,zisko/swift,kstaring/swift,cbrentharris/swift,zisko/swift,KrishMunot/swift,gottesmm/swift,therealbnut/swift,kusl/swift,tardieu/swift,dreamsxin/swift,aschwaighofer/swift,russbishop/swift,felix91gr/swift,gregomni/swift,allevato/swift,harlanhaskins/swift,karwa/swift,gribozavr/swift,gmilos/swift,allevato/swift,zisko/swift,karwa/swift,adrfer/swift,swiftix/swift.old,mightydeveloper/swift,kstaring/swift,frootloops/swift,hooman/swift,swiftix/swift.old,jckarter/swift,danielmartin/swift,therealbnut/swift,xwu/swift,natecook1000/swift,JGiola/swift,zisko/swift,CodaFi/swift,kusl/swift,amraboelela/swift,atrick/swift,ben-ng/swift,aschwaighofer/swift,brentdax/swift,allevato/swift,jtbandes/swift,devincoughlin/swift,modocache/swift,devincoughlin/swift,bitjammer/swift,aschwaighofer/swift,djwbrown/swift,benlangmuir/swift,arvedviehweger/swift,ben-ng/swift,zisko/swift,KrishMunot/swift,codestergit/swift,apple/swift,arvedviehweger/swift,natecook1000/swift,gribozavr/swift,kentya6/swift,amraboelela/swift,arvedviehweger/swift,djwbrown/swift,cbrentharris/swift,hughbe/swift,deyton/swift,gottesmm/swift,sdulal/swift,austinzheng/swift,stephentyrone/swift,jmgc/swift,jmgc/swift,LeoShimonaka/swift,deyton/swift,KrishMunot/swift,Jnosh/swift,codestergit/swift,brentdax/swift,SwiftAndroid/swift,MukeshKumarS/Swift,gribozavr/swift,tkremenek/swift,IngmarStein/swift,apple/swift,gottesmm/swift,nathawes/swift,Ivacker/swift,practicalswift/swift,Jnosh/swift,gmilos/swift,jopamer/swift,adrfer/swift,ahoppen/swift,xedin/swift,kperryua/swift,gribozavr/swift,johnno1962d/swift,swiftix/swift.old,huonw/swift,swiftix/swift.old,hughbe/swift,devincoughlin/swift,jtbandes/swift,mightydeveloper/swift,jckarter/swift,sdulal/swift,danielmartin/swift,natecook1000/swift,khizkhiz/swift,therealbnut/swift,IngmarStein/swift,aschwaighofer/swift,jopamer/swift,frootloops/swift,calebd/swift,manavgabhawala/swift,milseman/swift,arvedviehweger/swift,milseman/swift,allevato/swift,mightydeveloper/swift,jckarter/swift,khizkhiz/swift,apple/swift,gregomni/swift,roambotics/swift,jckarter/swift,return/swift,alblue/swift,codestergit/swift,sdulal/swift,alblue/swift,therealbnut/swift,practicalswift/swift,dduan/swift,brentdax/swift,ken0nek/swift,aschwaighofer/swift,swiftix/swift.old,ahoppen/swift,JaSpa/swift,harlanhaskins/swift,dduan/swift,khizkhiz/swift,jmgc/swift,felix91gr/swift,tkremenek/swift,karwa/swift,calebd/swift,austinzheng/swift,JaSpa/swift,emilstahl/swift,sdulal/swift,jckarter/swift,CodaFi/swift,lorentey/swift,gmilos/swift,ben-ng/swift,huonw/swift,Ivacker/swift,OscarSwanros/swift,emilstahl/swift,kperryua/swift,xwu/swift,parkera/swift,austinzheng/swift,tardieu/swift,MukeshKumarS/Swift,devincoughlin/swift,hughbe/swift,return/swift,kusl/swift,airspeedswift/swift,swiftix/swift,milseman/swift,huonw/swift,ken0nek/swift,ken0nek/swift,ahoppen/swift,tardieu/swift,xedin/swift,dduan/swift,calebd/swift,austinzheng/swift,harlanhaskins/swift,huonw/swift,mightydeveloper/swift,cbrentharris/swift,alblue/swift,jtbandes/swift,shajrawi/swift,nathawes/swift,xedin/swift,MukeshKumarS/Swift,LeoShimonaka/swift,practicalswift/swift,MukeshKumarS/Swift,shahmishal/swift,airspeedswift/swift,jopamer/swift,apple/swift,JGiola/swift,kentya6/swift,uasys/swift,practicalswift/swift,karwa/swift,kperryua/swift,amraboelela/swift,SwiftAndroid/swift,slavapestov/swift,JGiola/swift,slavapestov/swift,johnno1962d/swift,amraboelela/swift,hughbe/swift,CodaFi/swift,deyton/swift,return/swift,karwa/swift,lorentey/swift,hooman/swift,return/swift,bitjammer/swift,tkremenek/swift,SwiftAndroid/swift,roambotics/swift,practicalswift/swift,shahmishal/swift,lorentey/swift,khizkhiz/swift,OscarSwanros/swift,adrfer/swift,ben-ng/swift,brentdax/swift,adrfer/swift,uasys/swift,parkera/swift,natecook1000/swift,brentdax/swift,aschwaighofer/swift,sschiau/swift,ken0nek/swift,mightydeveloper/swift,CodaFi/swift,jmgc/swift,tjw/swift,bitjammer/swift,gribozavr/swift,russbishop/swift,hooman/swift,atrick/swift,LeoShimonaka/swift,tjw/swift,kperryua/swift,mightydeveloper/swift,danielmartin/swift,hooman/swift,emilstahl/swift,gregomni/swift,kstaring/swift,OscarSwanros/swift,tkremenek/swift,OscarSwanros/swift,CodaFi/swift,LeoShimonaka/swift,Ivacker/swift,tinysun212/swift-windows,roambotics/swift,LeoShimonaka/swift,harlanhaskins/swift,JaSpa/swift,shajrawi/swift,calebd/swift,djwbrown/swift,johnno1962d/swift,nathawes/swift,swiftix/swift,JGiola/swift,kusl/swift,stephentyrone/swift,gmilos/swift,milseman/swift,Jnosh/swift,uasys/swift,gregomni/swift,tinysun212/swift-windows,rudkx/swift,ken0nek/swift,benlangmuir/swift,amraboelela/swift,allevato/swift,tjw/swift,shajrawi/swift,ben-ng/swift,manavgabhawala/swift,natecook1000/swift,SwiftAndroid/swift,kentya6/swift,bitjammer/swift,benlangmuir/swift,gribozavr/swift,airspeedswift/swift,kentya6/swift,practicalswift/swift,lorentey/swift,JaSpa/swift,huonw/swift,KrishMunot/swift,parkera/swift,sdulal/swift,Jnosh/swift,cbrentharris/swift,codestergit/swift,ken0nek/swift,stephentyrone/swift,xwu/swift,emilstahl/swift,slavapestov/swift,sschiau/swift,MukeshKumarS/Swift,swiftix/swift,kstaring/swift,modocache/swift,manavgabhawala/swift,karwa/swift,glessard/swift,sdulal/swift,gribozavr/swift,shajrawi/swift,russbishop/swift,frootloops/swift,frootloops/swift,parkera/swift,manavgabhawala/swift,gregomni/swift,danielmartin/swift,tardieu/swift,alblue/swift,return/swift,ahoppen/swift,modocache/swift,hughbe/swift,jmgc/swift,jckarter/swift,jtbandes/swift,calebd/swift,brentdax/swift,JaSpa/swift,rudkx/swift,shahmishal/swift,swiftix/swift.old,frootloops/swift,rudkx/swift,swiftix/swift,tinysun212/swift-windows