manmanren added a comment. In http://reviews.llvm.org/D20844#445762, @rjmccall wrote:
> Hmm. No, I think the original code is correct here — RangeEnd is a token > range, and those are generally inclusive rather than exclusive. The fix-it > needs to be inserting at the end of the token. We currently insert the fix-it here SourceLocation TypeEndLoc = TSInfo->getTypeLoc().getLocEnd(); And we call "TL.setNameEndLoc(DS.getLocEnd());" for ObjCInterfaceTypeLoc. The problem is that for annotation token, both the start and the end point to the same location. With "DS.SetRangeEnd(Tok.getAnnotationEndLoc());", the DeclSpec has the same start and end location. Is there a way to get the real end of the annotation token, since getAnnotationEndLoc returns the start location? Thanks, Manman http://reviews.llvm.org/D20844 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits