Skip to content

[clang-format] QualifierAlignment option does not work when ifdef before variable declaration #167121

@vbvictor

Description

@vbvictor

If we have ifdef before variable declarations like this, the option QualifierAlignment doesn't format correctly:

struct A {};

int main() {
#if true
#endif
    A const as[10]; // Need to be `const A as[10]` instead
#if true
#endif
    for (A const a : as) {} // Need to be `const A a` instead
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-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