Switch the comment syntax from ; to // comments as discussed on Friday. There
is no strong reason to prefer one or the other, but // is nice for consistency
given the rest of the compiler is written in C++.
PiperOrigin-RevId: 204628476
diff --git a/test/IR/parser-errors.mlir b/test/IR/parser-errors.mlir
index ff3906a..27a53bd 100644
--- a/test/IR/parser-errors.mlir
+++ b/test/IR/parser-errors.mlir
@@ -1,107 +1,107 @@
-; TODO(andydavis) Resolve relative path issue w.r.t invoking mlir-opt in RUN
-; statements (perhaps through using lit config substitutions).
-;
-; RUN: %S/../../mlir-opt %s -o - -check-parser-errors
+// TODO(andydavis) Resolve relative path issue w.r.t invoking mlir-opt in RUN
+// statements (perhaps through using lit config substitutions).
+//
+// RUN: %S/../../mlir-opt %s -o - -check-parser-errors
-; Check different error cases.
-; -----
+// Check different error cases.
+// -----
-extfunc @illegaltype(i) ; expected-error {{expected type}}
+extfunc @illegaltype(i) // expected-error {{expected type}}
-; -----
+// -----
-extfunc @nestedtensor(tensor<tensor<i8>>) -> () ; expected-error {{expected type}}
+extfunc @nestedtensor(tensor<tensor<i8>>) -> () // expected-error {{expected type}}
-; -----
+// -----
cfgfunc @foo()
-cfgfunc @bar() ; expected-error {{expected '{' in CFG function}}
+cfgfunc @bar() // expected-error {{expected '{' in CFG function}}
-; -----
+// -----
-extfunc missingsigil() -> (i1, affineint, f32) ; expected-error {{expected a function identifier like}}
+extfunc missingsigil() -> (i1, affineint, f32) // expected-error {{expected a function identifier like}}
-; -----
+// -----
cfgfunc @bad_branch() {
bb42:
- br missing ; expected-error {{reference to an undefined basic block 'missing'}}
+ br missing // expected-error {{reference to an undefined basic block 'missing'}}
}
-; -----
+// -----
cfgfunc @block_redef() {
bb42:
return
-bb42: ; expected-error {{redefinition of block 'bb42'}}
+bb42: // expected-error {{redefinition of block 'bb42'}}
return
}
-; -----
+// -----
cfgfunc @no_terminator() {
bb40:
return
bb41:
-bb42: ; expected-error {{expected operation name}}
+bb42: // expected-error {{expected operation name}}
return
}
-; -----
+// -----
mlfunc @foo()
-mlfunc @bar() ; expected-error {{expected '{' in ML function}}
+mlfunc @bar() // expected-error {{expected '{' in ML function}}
-; -----
+// -----
mlfunc @no_return() {
-} ; expected-error {{ML function must end with return statement}}
+} // expected-error {{ML function must end with return statement}}
-; -----
+// -----
-" ; expected-error {{expected}}
+" // expected-error {{expected}}
"
-; -----
+// -----
-" ; expected-error {{expected}}
+" // expected-error {{expected}}
-; -----
+// -----
cfgfunc @no_terminator() {
bb40:
"foo"()
- ""() ; expected-error {{empty operation name is invalid}}
+ ""() // expected-error {{empty operation name is invalid}}
return
}
-; -----
+// -----
-extfunc @illegaltype(i0) ; expected-error {{invalid integer width}}
+extfunc @illegaltype(i0) // expected-error {{invalid integer width}}
-; -----
+// -----
mlfunc @incomplete_for() {
for
-} ; expected-error {{expected '{' before statement list}}
+} // expected-error {{expected '{' before statement list}}
-; -----
+// -----
mlfunc @non_statement() {
- asd ; expected-error {{expected statement}}
+ asd // expected-error {{expected statement}}
}
-; -----
+// -----
cfgfunc @malformed_dim() {
bb42:
- "dim"(){index: "xyz"} ; expected-error {{'dim' op requires an integer attribute named 'index'}}
+ "dim"(){index: "xyz"} // expected-error {{'dim' op requires an integer attribute named 'index'}}
return
}
-; -----
+// -----
-#map = (d0) -> (% ; expected-error {{invalid SSA name}}
+#map = (d0) -> (% // expected-error {{invalid SSA name}}
-; -----
+// -----