> I'm not sure sugar really matters. It does. `vector<int>::_Iter_type x = ...;` is not valid C++, no matter if it actually compiles on a particular implementation or not. And transforming non-portable code is asking for trouble.
> That said, one could foresee an improvement to this transform that tests for unusual sugar and then prompts the user. It can be done easier, I think. We know that all functions that return iterators have a return value type with correct sugar. That is, `vector<T>::begin()` return value is always `vector<T>::iterator`. We should desugar the user-provided type until we hit that correct type (then we are sure that the transformation is safe), or we get a canonical type (and that means that the code is unportable). http://llvm-reviews.chandlerc.com/D392 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
