Skip to content

[clang-format] bad formatting suggestion #119790

@Bigcheese

Description

@Bigcheese

The formatting suggestion here is wrong: #119740 (comment)

It's basically suggesting:

namespace N {
class C {
  // ...
  };
  } // namespace N
  void topLevelDecl() {}

This should be reproducible with:
git-clang-format --diff 4b825c7417f72ee88ee3e4316d0c01ed463f1241 11faee533d07aff6955d44bda0d502888e52e119 --extensions cpp,c,h -- clang/include/clang/Lex/ModuleMapFile.h clang/lib/Lex/ModuleMapFile.cpp clang/include/clang/Basic/Module.h clang/include/clang/Lex/ModuleMap.h clang/lib/Lex/ModuleMap.cpp clang/test/Modules/export_as_test.c

Although I believe you need to fetch those commits first.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions