1 // RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(test-diagnostic-filter{filters=mysource1}))" -split-input-file -o - 2>&1 | FileCheck %s
2 // This test verifies that diagnostic handler can emit the call stack successfully.
4 // CHECK-LABEL: Test 'test1'
5 // CHECK-NEXT: mysource2:1:0: error: test diagnostic
6 // CHECK-NEXT: mysource3:2:0: note: called from
7 func.func private @test1() attributes {
8 test.loc = loc(callsite("foo"("mysource1":0:0) at callsite("mysource2":1:0 at "mysource3":2:0)))
13 // CHECK-LABEL: Test 'test2'
14 // CHECK-NEXT: mysource1:0:0: error: test diagnostic
15 func.func private @test2() attributes {
16 test.loc = loc("mysource1":0:0)