Skip to content

CHKERRQ: allow passing the entire function call

Jed Brown requested to merge jed/chkerrq-single-use-ierr into master

Code formatters like clang-format and astyle behave poorly with line wrapping and the PETSc convention of hanging CHKERRQ(ierr) at the ends of lines. They do a better job if one writes

CHKERRQ(PetscFunction(with,args));

even if when wrapping long lines. This commit enables the above style by expanding ierr only once inside the CHKERRQ(ierr) macro.

Merge request reports