[PATCH] D120608: [Clang] Remove redundant init-parens in AST print

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 28 10:07:42 PST 2022


aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.

LGTM aside from a nit.



================
Comment at: clang/lib/AST/StmtPrinter.cpp:2155
 
-  CXXNewExpr::InitializationStyle InitStyle = E->getInitializationStyle();
-  if (InitStyle) {
-    if (InitStyle == CXXNewExpr::CallInit)
+  auto InitStyle = E->getInitializationStyle();
+  if (InitStyle != CXXNewExpr::NoInit) {
----------------
You should still spell out the type as it's not spelled out in the initialization.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120608



More information about the cfe-commits mailing list