[PATCH] D120608: [Clang] Remove redundant init-parens in AST print
Zhihao Yuan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 28 10:19:11 PST 2022
lichray 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) {
----------------
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.
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