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

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 20 15:04:55 PDT 2018


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: use angle brackets, no newline, and omit the file name / line number / column number on the end location if it's the same as on the start location.)


Repository:
  rC Clang

https://reviews.llvm.org/D50662





More information about the cfe-commits mailing list