Add override keyword on overidden virtual method (NFC)

Fix clang warnings

--

PiperOrigin-RevId: 247556495
This commit is contained in:
Mehdi Amini 2019-05-09 22:45:38 -07:00 committed by Mehdi Amini
parent 5fd4ec1b78
commit 211ceb9fd5
2 changed files with 14 additions and 12 deletions

View 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);
};

View 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();