LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 17756 - Remove trailing whitespace from c-style comments.
Summary: Remove trailing whitespace from c-style comments.
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Formatter (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Alexander Kornienko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-31 10:40 PDT by Sean Silva
Modified: 2013-11-12 11:58 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Silva 2013-10-31 10:40:27 PDT
Before:

static inline void silk_nsq_del_dec_scale_states(
    const silk_encoder_state *psEncC,               /* I    Encoder State                       */
);

After:
static inline void silk_nsq_del_dec_scale_states(
    const silk_encoder_state *psEncC, /* I    Encoder State
                                         */
    );

(here's a paste in case bugzilla mangles the long lines in "Before" <https://pastebin.mozilla.org/3390092>.

Note how the end of the comment gets wrapped even though it would fit just fine on the same line.
Comment 1 Alexander Kornienko 2013-11-12 11:58:35 PST
Fixed in r194493: clang-format will just replace whitespace with one space character instead of breaking the line, if it results in a line fitting in the column limit.