Project

General

Profile

Bug #3053

GPU_FUNC_TERM and GPU_FUNC_TERM_WITH_RETURN usage confuses clang-format

Added by Eric Irrgang about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
core library
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

These macros are used in headers that are included for both GPU and non-GPU builds to alternately define easily-inlined dummy functions or to declare optional GPU code paths. This means they may expand to either {} or ; and the macro must be expanded to have a well-formed C++ expression, which clang-format evidently does not do. See comments in https://gerrit.gromacs.org/c/gromacs/+/12300

Options include refactoring these constructs and code dispatching, but plausible quick fixes include adding potentially redundant/unnecessary ; to such usages.


Related issues

Blocks GROMACS - Task #2107: Change to clang-formatAccepted

Associated revisions

Revision 8e6de42b (diff)
Added by Berk Hess about 2 months ago

Remove semicolon from GPU TERM macros

This leads to less confusion in formatting tools such as clang-format.

Fixes #3053.

Change-Id: I0367b2f9ff1a8f8b4369505a41557c3feb8c9c71

History

#1 Updated by Eric Irrgang about 2 months ago

#2 Updated by Berk Hess about 2 months ago

  • Status changed from New to Resolved

#3 Updated by Mark Abraham about 1 month ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF