On Jul 26, 2012, at 2:16 AM, Andy Gibbs <[email protected]> wrote:

> I have implemented all of your comments, except the one relating to the
> tracking on Begin/EndSourceFile calls, for three reasons: firstly, I need
> to track in order to correctly attach and detach the preprocessor hooks;
> secondly, doing so highlighted the mismatch bug and (who knows) may do
> again in future; thirdly, when it comes the ARCMT tests fix in patch 2,
> I rely on knowing when the last EndSourceFile has been called.

Looks pretty good, but there's one last thing I'm not sure about. It kind of 
scares me that BeginSourceFile/EndSourceFile calls can be nested; I always 
thought that they were more BeginTranslationUnit / EndTranslationUnit, since 
they are most definitely NOT called for #includes. But they do seem to be 
called for searching module map files and for "chained includes" (which, by the 
way, seems like it could also have an unbalanced begin/end pair on error).

If they really are supposed to be nested, then your code is correct. If not, 
though, we should probably just be using a boolean for this.

Sorry for the delay; plenty of other stuff going on...
Jordan
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to