[PATCH] Whitespace issues during preprocessing

Harald van Dijk harald at gigawatt.nl
Sun Feb 2 12:15:54 PST 2014

On 01/02/14 20:09, Harald van Dijk wrote:
> Hi all,
> Attached are my updated patches intended to fix various whitespace
> issues in clang, modified to take Justin Bogner's comments into account.

Yet somehow, I missed that I again used braces around a single statement
in an if. I've reworked it to remove the braces, moving the comment
above the if-statement for readability. This patch replaces the patch of
the same name in my previous message.

Harald van Dijk

> They are intended to ensure that whitespace is not inappropriately
> removed just because a macro or macro argument expansion is empty, and
> does get removed during token pasting.
> I have moved the handling of invalid token pastes from
> TokenLexer::ExpandFunctionArguments to TokenLexer::Lex, so that it works
> for both object- and function-like macros, and both when ##'s operands
> use macro parameters and when they don't.
> Do these changes look okay now? If so, would someone be so kind as to
> commit them for me?
> Cheers,
> Harald van Dijk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Fix-handling-of-whitespace-in-invalid-token-pastes.patch
Type: text/x-patch
Size: 3244 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140202/71c3d451/attachment.bin>

More information about the cfe-commits mailing list