This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix wrong indentation of namespace identifiers after a concept declaration.
ClosedPublic

Authored by curdeius on Dec 19 2021, 1:48 PM.

Details

Summary

Before this patch, the code:

template <class T>
concept a_concept = X<>;
namespace B {
struct b_struct {};
} // namespace B

with config:

NamespaceIndentation: None

was wrongly indented inside namespace B, giving:

template <class T>
concept a_concept = X<>;
namespace B {
  struct b_struct {};
} // namespace B

Fixes https://github.com/llvm/llvm-project/issues/50645

Diff Detail

Event Timeline

curdeius requested review of this revision.Dec 19 2021, 1:48 PM
curdeius created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2021, 1:48 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
curdeius updated this revision to Diff 395355.Dec 19 2021, 1:51 PM

Undo unrelated changes.

This revision is now accepted and ready to land.Dec 19 2021, 2:33 PM
owenpan accepted this revision.Dec 19 2021, 11:43 PM
This revision was landed with ongoing or failed builds.Dec 20 2021, 12:13 AM
This revision was automatically updated to reflect the committed changes.