[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-23 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372595: [libTooling] Introduce new library of source-code builders. (authored by ymandel, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221103. ymandel added a comment. converted builders to return optional Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Tooling/Refactoring/

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/lib/Tooling/Refactoring/SourceCodeBuilders.cpp:68 +std::string tooling::buildParens(const Expr &E, const ASTContext &Context) { + StringRef ExprText = getText(E, Context); + if (mayNeedParens(E)) ymandel wrote:

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 221041. ymandel added a comment. address comments and some general cleanup Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Tooling/Refactor

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Thanks for the review! Agreed on all points and then some -- next revision will have a bunch of cleanups. I think the only major issue is the return type. See below. Comment at: clang/lib/Tooling/Refactoring/

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-20 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/SourceCodeBuilders.h:9 +/// +/// /file +/// This file collects facilities for generating source-code strings. "\file" Comment at: clang/include/clang/Tooling/R

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-19 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 220901. ymandel added a comment. Added parens operator; cleaned comments and api a bit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Too

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added inline comments. Comment at: clang/lib/Tooling/Refactoring/SourceCodeBuilders.cpp:77 + + if (Text.empty()) return std::string(); + // Add leading '*'. Eugene.Zelenko wrote: > Could return {}. Same in other

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 220488. ymandel added a comment. ran clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67632/new/ https://reviews.llvm.org/D67632 Files: clang/include/clang/Tooling/Refactoring/SourceCodeBuilders.h

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-16 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang/lib/Tooling/Refactoring/SourceCodeBuilders.cpp:77 + + if (Text.empty()) return std::string(); + // Add leading '*'. Could return {}. Same in other places. By the word, did you run Clang-format over code?

[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

2019-09-16 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a subscriber: mgorny. Herald added a project: clang. Introduces facilities for easily building source-code strings, including idiomatic use of the address-of, dereference and member-access operators (dot and arrow) an