aaron.ballman added inline comments.
================ 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) { ---------------- lichray wrote: > aaron.ballman wrote: > > You should still spell out the type as it's not spelled out in the > > initialization. > In this piece of code, I got "`CXXNewExpr`," "`InitializationStyle`", "`::`" > -- every morpheme needed to derive the type > "`CXXNewExpr::InitializationStyle`," so I guess it's clear enough. > I don't want to hold anything up over this, but the usual rule of thumb is "in the initialization" so that we don't have to hunt around to other code to figure out the type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120608/new/ https://reviews.llvm.org/D120608 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits