Add override keyword on overidden virtual method (NFC)
authorMehdi Amini <aminim@google.com>
Fri, 10 May 2019 05:45:38 +0000 (22:45 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 11 May 2019 02:26:59 +0000 (19:26 -0700)
    Fix clang warnings

--

PiperOrigin-RevId: 247556495

mlir/lib/IR/AsmPrinter.cpp
mlir/lib/Parser/Parser.cpp

index 4355919..f21595e 100644 (file)
@@ -1140,22 +1140,24 @@ public:
              bool printBlockTerminator = true);
 
   void printOperation(Operation *op);
-  void printGenericOp(Operation *op);
+  void printGenericOp(Operation *op) override;
 
   // Implement OpAsmPrinter.
-  raw_ostream &getStream() const { return os; }
-  void printType(Type type) { ModulePrinter::printType(type); }
-  void printAttribute(Attribute attr) { ModulePrinter::printAttribute(attr); }
-  void printAttributeAndType(Attribute attr) {
+  raw_ostream &getStream() const override { return os; }
+  void printType(Type type) override { ModulePrinter::printType(type); }
+  void printAttribute(Attribute attr) override {
+    ModulePrinter::printAttribute(attr);
+  }
+  void printAttributeAndType(Attribute attr) override {
     ModulePrinter::printAttributeAndType(attr);
   }
-  void printFunctionReference(Function *func) {
+  void printFunctionReference(Function *func) override {
     return ModulePrinter::printFunctionReference(func);
   }
-  void printOperand(Value *value) { printValueID(value); }
+  void printOperand(Value *value) override { printValueID(value); }
 
   void printOptionalAttrDict(ArrayRef<NamedAttribute> attrs,
-                             ArrayRef<StringRef> elidedAttrs = {}) {
+                             ArrayRef<StringRef> elidedAttrs = {}) override {
     return ModulePrinter::printOptionalAttrDict(attrs, elidedAttrs);
   };
 
index 245a50f..abd7bd2 100644 (file)
@@ -3203,7 +3203,7 @@ public:
 
   /// Parse a function name like '@foo' and return the name in a form that can
   /// be passed to resolveFunctionName when a function type is available.
-  virtual ParseResult parseFunctionName(StringRef &result, llvm::SMLoc &loc) {
+  ParseResult parseFunctionName(StringRef &result, llvm::SMLoc &loc) override {
     if (parseOptionalFunctionName(result, loc))
       return emitError(loc, "expected function name");
     return success();
@@ -3320,8 +3320,8 @@ public:
   }
 
   /// Resolve a parse function name and a type into a function reference.
-  virtual ParseResult resolveFunctionName(StringRef name, FunctionType type,
-                                          llvm::SMLoc loc, Function *&result) {
+  ParseResult resolveFunctionName(StringRef name, FunctionType type,
+                                  llvm::SMLoc loc, Function *&result) override {
     result = parser.resolveFunctionReference(name, loc, type);
     return failure(result == nullptr);
   }
@@ -3355,7 +3355,7 @@ public:
   /// Parse a region argument.  Region arguments define new values, so this also
   /// checks if the values with the same name has not been defined yet.  The
   /// type of the argument will be resolved later by a call to `parseRegion`.
-  ParseResult parseRegionArgument(OperandType &argument) {
+  ParseResult parseRegionArgument(OperandType &argument) override {
     // Use parseOperand to fill in the OperandType structure.
     if (parseOperand(argument))
       return failure();