Bug 531148 - [formatter] White space between code and line comments is not preserved with /* C-style */ comments
Summary: [formatter] White space between code and line comments is not preserved with ...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 9.4.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-14 08:40 EST by David Hebbeker CLA
Modified: 2020-09-04 15:23 EDT (History)
1 user (show)

See Also:


Attachments
Exported formatter profile. (17.47 KB, text/xml)
2018-02-14 08:40 EST, David Hebbeker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Hebbeker CLA 2018-02-14 08:40:52 EST
Created attachment 272673 [details]
Exported formatter profile.

When applying the formatter white spaces between code and C-style comments (in one line) are not preserved although the appropriate setting has been made.

Steps to reproduce
==================

Set preference for code formatter "Preserve white space between code and line comments if possible" to TRUE. Apply code formatter to this code:

    int a;    /* C-style comment */
    int ab;   /* C-style comment */
    int f;    // C++-style comment

Expected Result
===============

    int a;    /* C-style comment */
    int ab;   /* C-style comment */
    int f;    // C++-style comment

Actual Result
=============

    int a; /* C-style comment */
    int ab; /* C-style comment */
    int f;    // C++-style comment

Additional Information
======================

Exported settings (profile) are attached. Tested on Windows 7 and Ubuntu.

-- Configuration Details --
Product: Eclipse 4.7.2.20171218-0600 (org.eclipse.epp.package.cpp.product)Installed Features:
 org.eclipse.platform 4.7.2.v20171130-0510