Commits

Chris Lattner committed aac2a6c876b
Start teaching the inout writeback diagnostic to handle subscripts. The first step is to handle cases where the index lowers to exactly identical SILValue's. This is presently pretty uncommon (except in the moderately common case of a direct reference to a "let Int"), but is a nice base case. The diagnostic we now get is: t.swift:5:23: error: inout writeback through subscript occurs in multiple arguments to call, introducing invalid aliasing swap(&array[i][j], &array[i][i]) ^~~~~~~~ ~ t.swift:5:9: note: concurrent writeback occurred here swap(&array[i][j], &array[i][i]) ^~~~~~~~ ~ based on the fact that "i" lowers to the same SILValue. Swift SVN r20376