llvm-project/mlir/test/Pass/full_diagnostics_only_expected.mlir
Maksim Levental 1cec5fffd8
[mlir] implement -verify-diagnostics=only-expected (#135131)
This PR implements `verify-diagnostics=only-expected` which is a "best
effort" verification - i.e., `unexpected`s and `near-misses` will not be
considered failures. The purpose is to enable narrowly scoped checking
of verification remarks (just as we have for lit where only a subset of
lines get `CHECK`ed).
2025-04-10 18:50:00 -04:00

18 lines
495 B
MLIR

// RUN: mlir-opt %s -pass-pipeline='builtin.module(func.func(test-pass-failure{gen-diagnostics}))' -verify-diagnostics=only-expected
// Test that only expected errors are reported.
// reports {{illegal operation}} but unchecked
func.func @TestAlwaysIllegalOperationPass1() {
return
}
// expected-error@+1 {{illegal operation}}
func.func @TestAlwaysIllegalOperationPass2() {
return
}
// reports {{illegal operation}} but unchecked
func.func @TestAlwaysIllegalOperationPass3() {
return
}