[all-commits] [llvm/llvm-project] eddf4d: Fix SourceMgrDiagnosticHandler::convertLocToSMLoc ...

Jing Pu via All-commits all-commits at lists.llvm.org
Mon Jun 15 16:16:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eddf4dc869dbdedb81ab6f718b33d6db9f7cdaa1
      https://github.com/llvm/llvm-project/commit/eddf4dc869dbdedb81ab6f718b33d6db9f7cdaa1
  Author: Jing Pu <jingpu at google.com>
  Date:   2020-06-15 (Mon, 15 Jun 2020)

  Changed paths:
    M mlir/lib/IR/Diagnostics.cpp

  Log Message:
  -----------
  Fix SourceMgrDiagnosticHandler::convertLocToSMLoc for unknown line/column scenerio.

Summary: FileLineColLoc allows the column and line to be zero to represent unknown column and/or unknown line/column information. However, SourceMgr::FindLocForLineAndColumn treats line 0 and col 0 valid and pointing to the first line and col, respectively. To adapt this mismatch in semantics, we explicitly check line/col being zeros in SourceMgrDiagnosticHandler::convertLocToSMLoc

Differential Revision: https://reviews.llvm.org/D80258




More information about the All-commits mailing list