erichkeane added inline comments.
================ Comment at: clang/lib/AST/DeclPrinter.cpp:312 + // printing on the left side for readbility. + else if (const VarDecl *VD = dyn_cast<VarDecl>(D); + VD && VD->getInit() && ---------------- While compiling this, I discovered that the lack of curley braces on the `else if (canPrintOnLeftSide(A))` means that this `else-if` is actually an else to THAT instead, despite its indention (which implies it should be associated with the `if (const FunctionDecl...`). Which is it? I presume the indenting is what you mean, but it hasn't been tested in a way that matters. Can you add a test that validates the var-decl printing on the LHS ONLY happens when it 'can' print on the LHS? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141714/new/ https://reviews.llvm.org/D141714 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits