[PATCH] D154186: [clang][DeclPrinter] Fix AST print of delegating constructors

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 06:37:58 PDT 2023


aaron.ballman added a comment.

Thank you for the fix! This generally LGTM, but I did find some extra test cases to add.



================
Comment at: clang/test/AST/ast-print-method-decl.cpp:1
+// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s
+
----------------
I think the file should be named `ast-print-delegating-constructor.cpp`, WDYT?


================
Comment at: clang/test/AST/ast-print-method-decl.cpp:15
+  // CHECK-NEXT: };
+};
----------------
I'd also like to see test cases along the lines of:
```
struct B {
  template <typename Ty>
  B(Ty);
  B(int X) : B((float)X) {}
};

struct C {
  C(auto);
  C(int) : C("") {}
};
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154186/new/

https://reviews.llvm.org/D154186



More information about the cfe-commits mailing list