brintos

brintos / llvm-project-archived public Read only

0
0
Text · 599 B · c089185 Raw
20 lines · plain
1// RUN: mlir-opt %s -pass-pipeline="builtin.module(func.func(test-diagnostic-metadata))" -verify-diagnostics -o - 2>&1 | FileCheck %s2// COM: This test verifies that diagnostic handler can filter the diagnostic based on its metadata3// COM: whether to emit the errors.4 5// CHECK-LABEL: Test 'test'6func.func @test() {7  // expected-error @+1 {{test diagnostic metadata}}8  "test.emit_error"() {9    // CHECK: attr = "emit_error"10    attr = "emit_error"11  } : () -> ()12 13  "test.do_not_emit_error"() {14    // CHECK: attr = "do_not_emit_error"15    attr = "do_not_emit_error"16  } : () -> ()17 18  return19}20