[PATCH] D50662: Add dump() method for SourceRange

2018-08-30 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL341140: Add dump() method for SourceRange (authored by steveire, committed by ). Herald added a subscriber: llvm-commits.

[PATCH] D50662: Add dump() method for SourceRange

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: unittests/Basic/SourceManagerTest.cpp:189 + + // TODO: How do I get a loc in another file? + auto headerLoc = SourceMgr.getSpellingLoc(SourceMgr.translateLineCol(MainFileID, 3, 5)); I don't know how to resolve this T

[PATCH] D50662: Add dump() method for SourceRange

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 162282. steveire marked 3 inline comments as done. steveire added a comment. Add dump() and supporting methods to SourceRange Repository: rC Clang https://reviews.llvm.org/D50662 Files: include/clang/Basic/SourceLocation.h lib/Basic/SourceLocation.c

[PATCH] D50662: Add dump() method for SourceRange

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 162280. steveire added a comment. Add dump() and supporting methods to SourceRange Repository: rC Clang https://reviews.llvm.org/D50662 Files: include/clang/Basic/SourceLocation.h lib/Basic/SourceLocation.cpp unittests/Basic/SourceManagerTest.cpp

[PATCH] D50662: Add dump() method for SourceRange

2018-08-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Basic/SourceLocation.cpp:89-93 + B.print(OS, SM); + OS << ",\n "; + E.print(OS, SM); + OS << "]\n"; +} It would seem somewhat more natural to dump `SourceRange`s the same way we dump them in `-ast-dump`. (That is

[PATCH] D50662: Add dump() method for SourceRange

2018-08-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin requested changes to this revision. a_sidorin added a comment. This revision now requires changes to proceed. Hello Stephen, These methods will be really useful. Comment at: lib/Basic/SourceLocation.cpp:90 + B.print(OS, SM); + OS << ",\n "; + E.print(OS, SM); -

[PATCH] D50662: Add dump() method for SourceRange

2018-08-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Thanks, I've done that now. Repository: rC Clang https://reviews.llvm.org/D50662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D50662: Add dump() method for SourceRange

2018-08-20 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 161570. steveire added a comment. Add dump() and supporting methods to SourceRange Repository: rC Clang https://reviews.llvm.org/D50662 Files: include/clang/Basic/SourceLocation.h lib/Basic/SourceLocation.cpp Index: lib/Basic/SourceLocation.cpp ==

[PATCH] D50662: Add dump() method for SourceRange

2018-08-16 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. This seems like a reasonable addition. Maybe it could also provide `print` and `printToString` to more closely match the `SourceLocation` API? Repository: rC Clang https://reviews.llvm.org/D50662 ___ cfe-commits mailin

[PATCH] D50662: Add dump() method for SourceRange

2018-08-13 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D50662 Files: include/clang/Basic/SourceLocation.h lib/Basic/SourceLocation.cpp Index: lib/Basic/SourceLocation.cpp ==