refactor(uncrustify): disable formatting in problematic code sections

This commit is contained in:
Dundar Goc
2022-04-18 12:54:25 +02:00
parent 8c548c9e54
commit 995c186368
5 changed files with 20 additions and 4 deletions

View File

@@ -3972,12 +3972,16 @@ static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string)
if (op == '*') {
f1 = f1 * f2;
} else if (op == '/') {
// uncrustify:off
// Division by zero triggers error from AddressSanitizer
f1 = (f2 == 0 ? (
#ifdef NAN
f1 == 0 ? (float_T)NAN :
#endif
(f1 > 0 ? (float_T)INFINITY : (float_T)-INFINITY)) : f1 / f2);
// uncrustify:on
} else {
emsg(_("E804: Cannot use '%' with Float"));
return FAIL;