================
@@ -729,9 +735,15 @@ static mlir::ParseResult parseCallCommon(mlir::OpAsmParser
&parser,
if (parser.parseRParen())
return mlir::failure();
- if (parser.parseOptionalKeyword("nothrow").succeeded())
+ llvm::SMLoc optionalNothrowLoc = parser.getCurrentLocation();
+ if (parser.parseOptionalKeyword("nothrow").succeeded()) {
+ if (hasExceptions)
+ return parser.emitError(
+ optionalNothrowLoc,
+ "should have either `exception` or `nothrow`, but not both");
----------------
bcardosolopes wrote:
(a) One tradeoff here is having to `getParentTypeOf<T>` every-time you want to
find out whether this call is an "invoke". (b) if you are calling a nothrow
function decl inside a try block, how do you differentiate between them at
lowering time?
https://github.com/llvm/llvm-project/pull/164964
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits