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

Feng Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 28 11:56:25 PST 2019


liufengdb marked an inline comment as done and an inline comment as not done.
liufengdb added inline comments.


================
Comment at: mlir/test/lib/Transforms/TestDiagnosticHandler.cpp:1
+//===- TestDiagnosticHandler.cpp - Pass to test diagnostic handler --------===//
+//
----------------
liufengdb wrote:
> rriddle wrote:
> > Do we actually need an entirely new test driver? Seems like this could just be tested with a verifier error where the parsed operation has a callsite location.
> If I understand the logic correctly, the op verifier error triggers the InflightDiagnosticHandler with the "specified location" in the test. The SourceMgrDiagnosticHandler in mlir-opt is using the location of the buggy op in the mlir file. I couldn't connect the "specified location" with the SourceMgrDiagnosticHandler, which is actually the test target. Did I miss something? 
o, InflightDiagnostic isn't the handler. 

The stack trace display is by a protected method "emitDiagnostic(Diagnostic &diag)" and the verifier only triggers "emitDiagnostic(Location loc, Twine message, DiagnosticSeverity kind)". 


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