Re: r336219 - Fix crash in clang.

2018-07-09 Thread David Blaikie via cfe-commits
On Mon, Jul 9, 2018 at 1:52 PM Zachary Turner wrote: > makeArrayRef() isn't necessary, but when I was first looking at this I had > to stare at the code for a bit to see that there was an implicit conversion > happening. So I put the makeArrayRef() just for the benefit of the person > reading th

Re: r336219 - Fix crash in clang.

2018-07-09 Thread Zachary Turner via cfe-commits
makeArrayRef() isn't necessary, but when I was first looking at this I had to stare at the code for a bit to see that there was an implicit conversion happening. So I put the makeArrayRef() just for the benefit of the person reading the code. But no, it's not necessary. This did not fail on exis

Re: r336219 - Fix crash in clang.

2018-07-09 Thread David Blaikie via cfe-commits
Did this fail on an existing regression test, or is there a need for more test coverage? (guessing it failed on existing tests) Also, is the makeArrayRef necessary? Looks like if the original code compiled (implicitly converting from vector to ArrayRef) then the new code wouldn't need a makeArrayR

r336219 - Fix crash in clang.

2018-07-03 Thread Zachary Turner via cfe-commits
Author: zturner Date: Tue Jul 3 11:12:39 2018 New Revision: 336219 URL: http://llvm.org/viewvc/llvm-project?rev=336219&view=rev Log: Fix crash in clang. This happened during a recent refactor. toStringRefArray() returns a vector, which was being implicitly converted to an ArrayRef, and then the