[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG38b4516de8a4: [libTooling] Add function to determine associated text of a declaration. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 246706. ymandel added a comment. Fix failing test under msvc compatibility. Adds -fno-delayed-template-parsing to compilation arguments in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https:

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-26 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel reopened this revision. ymandel added a comment. This revision is now accepted and ready to land. Reopening for fix to failing tests that resulted in revert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. http://45.33.8.238/win/9173/step_7.txt Ptal! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/D72153 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9c54f6154f74: [libTooling] Add function to determine associated text of a declaration. (authored by ymandel). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thanks for the detailed review, especially given the complexity of the code! Comment at: clang/lib/Tooling/Transformer/SourceCode.cpp:152 +// will not break anything that removing the entity wouldn't have +// already broken. + bool TerminatedBy

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-25 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 246556. ymandel marked 8 inline comments as done. ymandel added a comment. Responded to all comments. No functional changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/D72

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-02-25 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Tooling/Transformer/SourceCode.h:42 +/// terminators. The returned range consists of file locations, if valid file +/// locations

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked an inline comment as done. ymandel added a comment. Thank you for the detailed review. I've significantly expanded and refactored the tests. I also lifted `validateEditRange` into its own function and added corresponding tests. Comment at: clang/lib/Tooling/Tra

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 241127. ymandel marked 12 inline comments as done. ymandel added a comment. tweaks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/D72153 Files: clang/include/clang/Tooling/

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 241124. ymandel marked 4 inline comments as done. ymandel added a comment. addressed comments, with significant reworking of tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-17 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/lib/Tooling/Transformer/SourceCode.cpp:128 + // First, lex to the current token (which is the last token of the range that + // we know to be deleted. Then, we process the first token separately from the + // rest based on c

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 237051. ymandel added a comment. fold initLexer into the callsite, because it's only called once. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/D72153 Files: clang/include

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 237044. ymandel added a comment. tweaked test organization Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/D72153 Files: clang/include/clang/Tooling/Transformer/SourceCode.h

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-08 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 236879. ymandel added a comment. Fixed behavior in some corner cases; added tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/D72153 Files: clang/include/clang/Tooling/T

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 236057. ymandel added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72153/new/ https://reviews.llvm.org/D72153 Files: clang/include/clang/Tooling/Transformer/SourceCode.h clang/lib/

[PATCH] D72153: [libTooling] Add function to determine associated text of a declaration.

2020-01-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. This patch adds `getAssociatedRange` which, for a given decl, computes preceding and trailing text that would conceptually be associated with the decl by the reader. This includes comments, whitespac