Skip to content

"// clang-format off" comment should not be formatted #38628

Closed as not planned
Closed as not planned
@sylvestre

Description

@sylvestre
Bugzilla Link 39280
Version unspecified
OS Linux
CC @aardappel,@abpostelnicu

Extended Description

with this code:

static const uint32_t gWinEventMap[] = {
  // clang-format off
  1,
  2,
  3
// clang-format on
};

% clang-format-7 foo.cpp
returns:

static const uint32_t gWinEventMap[] = {
    // clang-format off
  1,
  2,
  3
    // clang-format on
};

Because // clang-format off is all about disabling coding style, I believe we should not touch this comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclang-formatobsoleteIssues with old (unsupported) versions of LLVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions