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.
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
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
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
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
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);
-
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
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
==
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
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
==
10 matches
Mail list logo