@@ -12903,6 +12903,48 @@ def err_acc_update_as_body
1290312903 : Error<"OpenACC 'update' construct may not appear in place of the "
1290412904 "statement following a%select{n if statement| while statement| do "
1290512905 "statement| switch statement| label statement}0">;
12906+ def err_acc_invalid_atomic
12907+ : Error<"statement associated with OpenACC 'atomic%select{| "
12908+ "%1}0' directive is invalid">;
12909+ def note_acc_atomic_expr_must_be
12910+ : Note<"expected "
12911+ "%enum_select<OACCAtomicExpr>{%Assign{assignment}|%UnaryCompAssign{"
12912+ "assignment, compound assignment, increment, or decrement}}0 "
12913+ "expression">;
12914+ def note_acc_atomic_unsupported_unary_operator
12915+ : Note<"unary operator not supported, only increment and decrement "
12916+ "operations permitted">;
12917+ def note_acc_atomic_unsupported_binary_operator
12918+ : Note<"binary operator not supported, only +, *, -, /, &, ^, |, <<, or >> "
12919+ "are permitted">;
12920+ def note_acc_atomic_unsupported_compound_binary_operator
12921+ : Note<"compound binary operator not supported, only +=, *=, -=, /=, &=, "
12922+ "^=, |=, <<=, or >>= are permitted">;
12923+
12924+ def note_acc_atomic_operand_lvalue_scalar
12925+ : Note<"%select{left |right |}0operand to "
12926+ "%enum_select<OACCAtomicOpKind>{%Assign{assignment}|%CompoundAssign{"
12927+ "compound assignment}|%Inc{increment}|"
12928+ "%Dec{decrement}}1 "
12929+ "expression must be "
12930+ "%enum_select<OACCLValScalar>{%LVal{an l-value}|%Scalar{of scalar "
12931+ "type (was %3)}}2">;
12932+ def note_acc_atomic_too_many_stmts
12933+ : Note<"'atomic capture' with a compound statement only supports two "
12934+ "statements">;
12935+ def note_acc_atomic_expected_binop : Note<"expected binary operation on right "
12936+ "hand side of assignment operator">;
12937+ def note_acc_atomic_mismatch_operand
12938+ : Note<"left hand side of assignment operation('%0') must match one side "
12939+ "of the sub-operation on the right hand side('%1' and '%2')">;
12940+ def note_acc_atomic_mismatch_compound_operand
12941+ : Note<"variable %select{|in unary expression|on right hand side of "
12942+ "assignment|on left hand side of assignment|on left hand side of "
12943+ "compound assignment|on left hand side of assignment}2('%3') must "
12944+ "match variable used %select{|in unary expression|on right hand "
12945+ "side of assignment|<not possible>|on left hand side of compound "
12946+ "assignment|on left hand side of assignment}0('%1') from the first "
12947+ "statement">;
1290612948
1290712949// AMDGCN builtins diagnostics
1290812950def err_amdgcn_global_load_lds_size_invalid_value : Error<"invalid size value">;
0 commit comments