[cfe-dev] Fix for preprocessor CommentHandler bug
Andy Gibbs
andyg1001 at hotmail.co.uk
Tue Jun 19 00:57:18 PDT 2012
On Monday, June 18, 2012 6:50 PM, Andy Gibbs wrote:
> On Monday, June 18, 2012 2:20 AM, Richard Smith wrote:
>> For the patch itself, would it make sense to move the
>> LexingRawMode alteration into CheckEndOfDirective?
>
> Yes, this might make more sense. I'll have a look into it tomorrow.
Actually, it doesn't make more sense. It makes more sense in my opinion to
keep the control of LexingRawMode in the loop, since it is set before the
loop and cleared afterwards. If we move it into CheckEndOfDirective then we
may start to see other regressions since this is called from other
locations.
Attached is the revised patch. The test-case is a gunit test. I followed
the "FIXME: Put into a common location" comment and placed the TestVisitor
and ExpectedLocationVisitor classes from RecursiveASTVisitorTest.cpp and
placed them into a separate include file, TestVisitor.h, which my new
test-case, CommentHandlerTest.cpp, also then uses.
This patch requires that patch at
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2012-June/022289.html be applied
first.
Cheers
Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commenthandler-v2.diff
Type: application/octet-stream
Size: 18069 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120619/ebe6af9e/attachment.obj>
More information about the cfe-dev
mailing list