[PATCH] D71851: Use the first location in the fused location for diagnostic handler

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 09:51:03 PST 2020


rriddle accepted this revision.
rriddle added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/IR/Diagnostics.cpp:378
+  case StandardAttributes::FusedLocation:
+    return getFileLineColLoc(loc.cast<FusedLoc>().getLocations().front());
+  default:
----------------
I wonder if we should try each of the locations until we find one that is usable?


================
Comment at: mlir/lib/IR/Diagnostics.cpp:392
+  case StandardAttributes::FusedLocation:
+    return getCallSiteLoc(loc.cast<FusedLoc>().getLocations().front());
   default:
----------------
Same here.


================
Comment at: mlir/test/IR/diagnostic-handler.mlir:6
+
+// emit the first call stack in the fused location.
+func @constant_out_of_range() {
----------------
Start sentence with a capital letter.


================
Comment at: mlir/test/IR/diagnostic-handler.mlir:14
+}
\ No newline at end of file

----------------
Can we add a newline here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71851/new/

https://reviews.llvm.org/D71851





More information about the llvm-commits mailing list