[cfe-dev] Fix for preprocessor CommentHandler bug
andyg1001 at hotmail.co.uk
Tue Jun 12 10:07:01 PDT 2012
On Tuesday, June 12, 2012 6:31 PM, David Blaikie wrote:
> <clippy>It looks like you're trying to fix a bug - would you like to
> include a test case?</clippy>
> & is this a fix for: http://llvm.org/bugs/show_bug.cgi?id=13065 by
> chance? I'm curious what caused the bug as I'd assumed it was due to
> my commit ( https://llvm.org/svn/llvm-project/cfe/trunk@158093 ). But
> judging by the fix, that might not be the case.
No, the bug was uncovered while making an enhancement patch for the
"-verify" feature, where I changed from the use of the separate parse step
to using the CommentHandler interface. Unfortunately, the CommentHandler
interface was not invoked in some cases where comments followed #else or
#endif directives, and this meant I needed to alter some pre-existing
test-cases to enable them to work with my patch. This fix was directed at
removing this necessity.
In reply, then, to the missing test-cases, I have test-cases as part of my
patch for the new "-verify" feature, since this actually uses the
CommentHandler interface and can directly test it. I accept that this is a
weak reply, but my hope is that with the approval of this and my other
recent preprocessor patch, then my "-verify" patch can also meet with
approval -- in which case the test-cases will appear as part of that.
Alternatively, is there a better way to test the CommentHandler interface?
If so, I can supply some specific test-cases for this patch.
More information about the cfe-dev