[PATCH] D20134: [libclang] Fixed bug where ranges in spelling locations (in macro expansions) would get mangled

2016-05-10 Thread Cameron via cfe-commits
cameron314 created this revision. cameron314 added a reviewer: rsmith. cameron314 added a subscriber: cfe-commits. The end location of the range would be changed into its expansion location, but the beginning of the range would stay as a spelling location. This would lead to very weird ranges sp

Re: [PATCH] D20134: [libclang] Fixed bug where ranges in spelling locations (in macro expansions) would get mangled

2016-05-10 Thread Richard Smith via cfe-commits
rsmith added a comment. I agree that this looks wrong. Does test/Index/cindex-on-invalid.m still pass with this change? (See http://reviews.llvm.org/rL129872 in which it was added.) It looks like the problem is that we lose the information about whether we're supposed to be pointing to the sta

Re: [PATCH] D20134: [libclang] Fixed bug where ranges in spelling locations (in macro expansions) would get mangled

2016-05-12 Thread Cameron via cfe-commits
cameron314 added a comment. You're right, this breaks that test. The corner case that it exercises is arguably less important than breaking all spelling ranges, though. But I'm going to see if I can fix both with a little wizardry (ideally there wouldn't be open ranges in the first place, since