DeclPrinter::PrintConstructorInitializers did not consider curly constructor initializers. Any curly constructor initializers (e.g. A() : Field{}) was printed with round brackets (e.g. A() : Field({})).
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Maybe add a designated init test in there as well e.g.
struct A {
int x {};
};
struct B {
B() : a({.x = 1}) {
}
A a;
};| clang/test/AST/ast-print-method-decl.cpp | ||
|---|---|---|
| 104 | Can you add another ctor that uses round parens for the member initializers? | |
Comment Actions
@aaron.ballman and @shafik: Thank you for your fast review and your suggestions. I have added additional ctor variants accordingly.
Can you add another ctor that uses round parens for the member initializers?