[cfe-commits] [PATCH] Missing call to preprocessor callback.
Argyrios Kyrtzidis
akyrtzi at gmail.com
Wed Jan 16 08:53:27 PST 2013
In r172623, thanks!
On Jan 14, 2013, at 3:05 AM, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:
> Hello.
>
> The comment for the preprocessor callback MacroUndefined says:
>
> /// \brief Hook called whenever a macro \#undef is seen.
>
> However, in function
>
> void Preprocessor::HandleUndefDirective(Token &UndefTok) {
>
> the callback is only called after the following check:
>
> // If the macro is not defined, this is a noop undef, just return.
> if (MI == 0) return;
>
> As a result, the client is not notified for some of the #undef's.
>
> Afawct, the client should always be notified, no matter if the macro was actually defined or not (if it was not previously defined, the callback should be passed in the null MacroInfo pointer).
>
> Please, find attached a corresponding patch for review.
>
> NOTE: searching the mailing list, it seems the same issue was reported by Jason Haslam in the following post, apparently with no follow up:
>
> http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120220/053916.html
>
> Enea.
> <MacroUndefined.patch>_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list