Closed as not planned
Description
Bugzilla Link | 39883 |
Version | unspecified |
OS | All |
Reporter | LLVM Bugzilla Contributor |
Extended Description
The following code is scrambled after formatting it with clang-format:
namespace a {
class A {
public:
void foo() {
#ifdef RANDOM_INIT
{ randomize(); }
#endif
}
A() {}
};
} // namespace a
When the constructor "A() { }" or the brackets around "randomize();" are removed the formatting is as expected. (The brackets are there, because I have a #pragma for the block.)
clang-format --version
clang-format version 8.0.0 (tags/google/stable/2018-10-04)
Content of .clang-format:
BasedOnStyle: Chromium
Language: Cpp
AlignConsecutiveAssignments: true
AlignOperands: true
FixNamespaceComments: true