[PATCH] Whitespace issues during preprocessing

Harald van Dijk harald at gigawatt.nl
Wed Jan 15 12:06:25 PST 2014


Hi all,

Quite a while ago, I noticed that clang had some preprocessor issues
with whitespace when macro arguments were empty, and reported that at
<http://llvm.org/bugs/show_bug.cgi?id=15675>. I've now taken a closer
look, and found a few more problems. Attached are three patches that
should address these problems, and one patch that has no functional
effect but makes the code a bit easier to follow. They include new tests
and tweak one existing test. All tests pass, and to make sure I am not
misinterpreting the standard, I've verified that all new and changed
tests also pass with GCC.

Any thoughts or comments? Can these patches be committed?

Cheers,
Harald van Dijk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-whitespace-handling-in-operator.patch
Type: text/x-patch
Size: 5684 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140115/9ad229d9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-whitespace-handling-in-empty-macro-arguments.patch
Type: text/x-patch
Size: 7170 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140115/9ad229d9/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Fix-whitespace-handling-in-empty-macro-expansions.patch
Type: text/x-patch
Size: 2534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140115/9ad229d9/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Clean-up-whitespace-checks.patch
Type: text/x-patch
Size: 3186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140115/9ad229d9/attachment-0003.bin>


More information about the cfe-commits mailing list