[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa130cf8ae8ab: [clang] Fix printing of lambdas with capture expressions (authored by walrus, committed by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Ilya Golovenko via Phabricator via cfe-commits
walrus marked 2 inline comments as done. walrus added a comment. In D83855#2155303 , @kadircet wrote: > thanks, lgtm! Thank you much for the review! I do not have commit access. Could you please commit the changes on my behalf? Ilya Golovenko Reposit

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. do you have commit access? if not I am happy to land this for you. After having some commits done on your behalf, you can apply for commit access as described in https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access Repository: rG LLVM Github Monorepo

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Ilya Golovenko via Phabricator via cfe-commits
walrus updated this revision to Diff 278420. walrus added a comment. Simplify if..else statement, add braces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83855/new/ https://reviews.llvm.org/D83855 Files: clang/lib/AST/StmtPrinter.cpp clang/te

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, lgtm! Comment at: clang/lib/AST/StmtPrinter.cpp:2014 + if (D->getInitStyle() == VarDecl::CallInit) { +if (!isa(D->getInit())) { + Pre = "(";

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Ilya Golovenko via Phabricator via cfe-commits
walrus marked an inline comment as done. walrus added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:2011 + Expr *Init = D->getInit(); + if (D->getInitStyle() == VarDecl::CallInit && !isa(Init)) +OS << "("; kadircet wrote: > walrus w

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Ilya Golovenko via Phabricator via cfe-commits
walrus updated this revision to Diff 278412. walrus added a comment. Remove unused struct definition Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83855/new/ https://reviews.llvm.org/D83855 Files: clang/lib/AST/StmtPrinter.cpp clang/test/AST/a

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-16 Thread Ilya Golovenko via Phabricator via cfe-commits
walrus updated this revision to Diff 278411. walrus added a comment. Simplify code according to suggestions in code review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83855/new/ https://reviews.llvm.org/D83855 Files: clang/lib/AST/StmtPrinter.

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:2011 + Expr *Init = D->getInit(); + if (D->getInitStyle() == VarDecl::CallInit && !isa(Init)) +OS << "("; walrus wrote: > kadircet wrote: > > what about having a `Pre` and

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-15 Thread Ilya Golovenko via Phabricator via cfe-commits
walrus marked an inline comment as done. walrus added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:2011 + Expr *Init = D->getInit(); + if (D->getInitStyle() == VarDecl::CallInit && !isa(Init)) +OS << "("; kadircet wrote: > what abo

[PATCH] D83855: [clang] Fix printing of lambdas with capture expressions

2020-07-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:2011 + Expr *Init = D->getInit(); + if (D->getInitStyle() == VarDecl::CallInit && !isa(Init)) +OS << "("; what about having a `Pre` and `Post` print blocks, set to `"(" an

[PATCH] D83855: [clang] fix printing of lambdas with capture expressions

2020-07-15 Thread Ilya Golovenko via Phabricator via cfe-commits
walrus created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D83855 Files: clang/lib/AST/StmtPrinter.cpp clang/test/AST/ast-printer-lambda.cpp Index: clang/test/AST/ast-printer-lambda.cpp