forked from OSchip/llvm-project
[ParseResult] Fix warning in flang build, incorporate feedback from River.
The warning caused build errors on a couple flang testers that are building with -Werror. The diagnostic change makes the generated error correct. This is a followup to https://reviews.llvm.org/D125549 Differential Revision: https://reviews.llvm.org/D125587
This commit is contained in:
parent
189ca6958e
commit
27478872fd
|
@ -914,9 +914,9 @@ mlir::ParseResult fir::CoordinateOp::parse(mlir::OpAsmParser &parser,
|
|||
if (parser.parseOptionalAttrDict(result.attributes) ||
|
||||
parser.parseColonType(funcTy) ||
|
||||
parser.resolveOperands(allOperands, funcTy.getInputs(), loc,
|
||||
result.operands))
|
||||
result.operands) ||
|
||||
parser.addTypesToList(funcTy.getResults(), result.types))
|
||||
return mlir::failure();
|
||||
parser.addTypesToList(funcTy.getResults(), result.types);
|
||||
result.addAttribute("baseType", mlir::TypeAttr::get(funcTy.getInput(0)));
|
||||
return mlir::success();
|
||||
}
|
||||
|
|
|
@ -3112,15 +3112,15 @@ void spirv::ModuleOp::build(OpBuilder &builder, OperationState &state,
|
|||
|
||||
ParseResult spirv::ModuleOp::parse(OpAsmParser &parser, OperationState &state) {
|
||||
Region *body = state.addRegion();
|
||||
StringAttr nameAttr;
|
||||
spirv::AddressingModel addrModel;
|
||||
spirv::MemoryModel memoryModel;
|
||||
|
||||
// If the name is present, parse it.
|
||||
StringAttr nameAttr;
|
||||
(void)parser.parseOptionalSymbolName(
|
||||
nameAttr, mlir::SymbolTable::getSymbolAttrName(), state.attributes);
|
||||
|
||||
// Parse attributes
|
||||
spirv::AddressingModel addrModel;
|
||||
spirv::MemoryModel memoryModel;
|
||||
if (::parseEnumKeywordAttr(addrModel, parser, state) ||
|
||||
::parseEnumKeywordAttr(memoryModel, parser, state))
|
||||
return failure();
|
||||
|
|
|
@ -518,7 +518,7 @@ ParseResult AffineParser::parseAffineMapOrIntegerSetInline(AffineMap &map,
|
|||
if (consumeIf(Token::arrow))
|
||||
return parseAffineMapRange(numDims, numSymbols, map);
|
||||
|
||||
if (parseToken(Token::colon, "expected '->' or '['"))
|
||||
if (parseToken(Token::colon, "expected '->' or ':'"))
|
||||
return failure();
|
||||
return parseIntegerSetConstraints(numDims, numSymbols, set);
|
||||
}
|
||||
|
|
|
@ -932,7 +932,7 @@ func.func @invalid_tensor_literal() {
|
|||
|
||||
func.func @invalid_affine_structure() {
|
||||
%c0 = arith.constant 0 : index
|
||||
%idx = affine.apply affine_map<(d0, d1)> (%c0, %c0) // expected-error {{expected '->' or '['}}
|
||||
%idx = affine.apply affine_map<(d0, d1)> (%c0, %c0) // expected-error {{expected '->' or ':'}}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue