[cfe-commits] const_cast fun

Mike Stump mrs at apple.com
Fri Aug 7 11:06:52 PDT 2009


On Aug 6, 2009, at 7:27 PM, Daniel Dunbar wrote:
> Better, IMHO. I am pro lifting const to ASTContext where appropriate,
> pushing const_cast into ASTContext as necessary, and eventually
> marking the appropriate fields mutable and dropping const_cast.

The reason why I even asked is because const is a times tricky.  You  
have to push it in one direction, if you push in the other direction,  
you just wind up making things worse.  One problem is the field is  
already mutable, and as you push in this direction, the entire  
compiler starts unravelling in a massive way.  I was up at 200 lines  
of diffs, just pursuing the first problem found each time, and it just  
went deeper and deeper with seemingly no end in site. I didn't want a  
20k line diff to fix the next problem, so I just stopped here.  I'll  
come back to this at some point, but for now, I've got more pressing  
things.



More information about the cfe-commits mailing list