[cfe-commits] [Patch 1 of 4] -verify fixes (stage 2)

Jordan Rose jordan_rose at apple.com
Fri Jul 27 18:18:50 PDT 2012


On Jul 26, 2012, at 2:16 AM, Andy Gibbs <andyg1001 at hotmail.co.uk> 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



More information about the cfe-commits mailing list