bolt/deps/llvm-18.1.8/mlir/test/mlir-opt/nearmiss.mlir
2025-02-14 19:21:04 +01:00

22 lines
567 B
MLIR

// RUN: mlir-opt --split-input-file --verify-diagnostics %s 2> %t && FileCheck --input-file %t %s
// RUN: cat %t
func.func @main() {return}
// -----
// expected-note @+1 {{see existing symbol definition here}}
func.func @foo() { return }
// CHECK: warning: near miss with file split marker
// CHECK: ----
// ----
// expected-error @+1 {{redefinition of symbol named 'foo'}}
func.func @foo() { return }
// CHECK: warning: near miss with file split marker
// CHECK: ----
// ----
func.func @bar2() {return }
// No error flagged at the end for a near miss.
// ----