Files
clang-p2996/mlir/test/IR/diagnostic-handler.mlir
River Riddle 1bd1edaf40 [mlir:ODS] Support using attributes in AllTypesMatch to automatically add InferTypeOpInterface
This allows for using attribute types in result type inference for use with
InferTypeOpInterface. This was a TODO before, but it isn't much
additional work to properly support this. After this commit,
arith::ConstantOp can now have its InferTypeOpInterface implementation automatically
generated.

Differential Revision: https://reviews.llvm.org/D124580
2022-04-28 12:57:59 -07:00

14 lines
619 B
MLIR

// RUN: not mlir-opt %s -o - 2>&1 | FileCheck %s
// This test verifies that diagnostic handler can emit the call stack successfully.
// -----
// Emit the first available call stack in the fused location.
func.func @constant_out_of_range() {
// CHECK: mysource1:0:0: error: 'arith.constant' op failed to verify that all of {value, result} have same type
// CHECK-NEXT: mysource2:1:0: note: called from
// CHECK-NEXT: mysource3:2:0: note: called from
%x = "arith.constant"() {value = 100} : () -> i1 loc(fused["bar", callsite("foo"("mysource1":0:0) at callsite("mysource2":1:0 at "mysource3":2:0))])
return
}