c-snug-do-while is a compiled Lisp function in `cc-align.el'.

(c-snug-do-while SYNTAX POS)

Dynamically calculate brace hanginess for do-while statements.
Using this function, `while' clauses that end a `do-while' block will
remain on the same line as the brace that closes that block.

See `c-hanging-braces-alist' for how to utilize this function as an
ACTION associated with `block-close' syntax.