yaron.keren added a comment. This code was my first thought too, but I had been commented on the structure of very similar code in this file: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20150713/133105.html http://reviews.llvm.org/D14164