Skip to content
Commit 6ca52815 authored by Krystian Kuzniarek's avatar Krystian Kuzniarek Committed by Björn Schäpers
Browse files

[clang-format][PR47290] Add ShortNamespaceLines format option

clang-format documentation states that having enabled
FixNamespaceComments one may expect below code:

c++
namespace a {
foo();
}

to be turned into:

c++
namespace a {
foo();
} // namespace a

In reality, no "// namespace a" was added. The problem was too high
value of kShortNamespaceMaxLines, which is used while deciding whether
a namespace is long enough to be formatted.

As with 9163fe2a, clang-format idempotence is preserved.

Differential Revision: https://reviews.llvm.org/D87587
parent 418b4a7b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment