On Mon, Jun 10, 2013 at 6:03 PM, Eli Friedman <[email protected]>wrote:
> On Mon, Jun 10, 2013 at 8:39 AM, Manuel Klimek <[email protected]> wrote: > >> On Fri, Jun 7, 2013 at 10:31 PM, Eli Friedman <[email protected]>wrote: >> >>> Author: efriedma >>> Date: Fri Jun 7 15:31:48 2013 >>> New Revision: 183563 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=183563&view=rev >>> Log: >>> Re-commit r183466 with a fix to make the TypeLoc casting machinery work >>> correctly in the presence of qualified types. >>> >>> (I had to change the unittest because it was trying to cast a >>> QualifiedTypeLoc to TemplateSpecializationTypeLoc.) >>> >> >> That did work before though... Why doesn't that work any more? >> > > It essentially worked by accident: pretty much all the TypeLoc subclass > inherit from UnqualTypeLoc, but they were forgetting to check that the > TypeLoc was actually unqualified. > > If it's useful functionality, I guess I could modify the casting routines > to implicitly strip qualifiers where appropriate. > Ha, I didn't even know that there was a QualifiedTypeLoc (I'd have expected it to be called QualTypeLoc :P) At least now I learned how I get to the qualifier location on type locations :) I'm not sure how often people already rely on the castAs working through the boundaries. I think it's unfortunate enough that types have their own casting mechanism. Thanks for the info. /Manuel
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
