1 // RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(test-diagnostic-metadata))" -verify-diagnostics -o - 2>&1 | FileCheck %s
2 // COM: This test verifies that diagnostic handler can filter the diagnostic based on its metadata
3 // COM: whether to emit the errors.
5 // CHECK-LABEL: Test 'test'
7 // expected-error @+1 {{test diagnostic metadata}}
9 // CHECK: attr = "emit_error"
13 "test.do_not_emit_error"() {
14 // CHECK: attr = "do_not_emit_error"
15 attr = "do_not_emit_error"