Make scope explicit to avoid misleading-indentation warnings.
authorJacques Pienaar <jpienaar@google.com>
Sat, 25 May 2019 18:03:25 +0000 (11:03 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 03:03:02 +0000 (20:03 -0700)
--

PiperOrigin-RevId: 249986537

mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

index 5e1199f..3d5a3b9 100644 (file)
@@ -946,12 +946,12 @@ void OpEmitter::genVerifier() {
                     &fctx.withSelf("this->getOperation()->get" +
                                    Twine(isOperand ? "Operand" : "Result") +
                                    "(" + Twine(index) + ")->getType()"))
-           << "))\n";
+           << ")) {\n";
       body << "    return emitOpError(\"" << (isOperand ? "operand" : "result")
            << " #" << index
            << (description.empty() ? " type precondition failed"
                                    : " must be " + Twine(description))
-           << "\");\n";
+           << "\");\n  }\n";
     }
   };