I've been trying to implement the relevant fix-it, but apart from not being able to find the end of the expression being cast (to insert the closing paren), the pathological case
On Fri, Nov 22, 2013 at 2:13 AM, Dmitri Gribenko <[email protected]> wrote: > (for example, static cast of a const cast) might pose even more of a challenge, because I have to find and print the "halfway" type: int i = 42; const int *cpi = &i; float *fi = (float *)cpi; // -> reinterpret_cast<float *>(const_cast<int *>(cpi)); This already spells trouble with regard to code formatting, and it gets worse if I have a multi-level pointer type where some of the levels are const and some aren't. (Also, I have to move the warning from Parser to Sema because only then do I have the type information to generate a fix-it, so I don't know at all how well it will work with templates.) Cheers, ~~ Ondra _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
