Closed GoogleCodeExporter closed 9 years ago
The regular expression will always match either the 'quote' or the 'angle'.
The bug arises because the result of the match can be an empty string.
This happens e.g. if you have '#include <MACRO>' where MACRO could potentially
evaluate to an empty string.
The code is testing
if match_result.group('quote'):
rather than
if match_result.group('quote') != None:
and this test fails when the match succeeds but matches an empty string.
But since an empty string can never be a valid include file name,
it is fine for the include server to exclude that possibility from its analysis.
(If the expression does actually evaluate to an empty string, the compiler will
report an error.)
So your patch is fine.
Original comment by fergus.h...@gmail.com
on 4 Apr 2012 at 6:33
Attachments:
As I explained in response to another bug, I've given you commit permissions.
Please use them wisely -- make sure to get all changes reviewed and approved
before committing.
But this change looks good, so please feel free to go and commit this fix to
our svn repository.
Original comment by fergus.h...@gmail.com
on 4 Apr 2012 at 6:51
Original comment by kamal@whence.com
on 4 Apr 2012 at 7:04
Fix applied as SVN r759.
Original comment by kamal@whence.com
on 4 Apr 2012 at 7:27
Original issue reported on code.google.com by
kamal@whence.com
on 4 Apr 2012 at 4:14Attachments: