Menu

#111 Configuration option to break opening braces of braced extern "C" statments

2.0
open
nobody
None
2018-10-01
2018-10-01
A Klaey
No

Currently only --Attach-extern-c impacts the braces location of braced extern "C" statments.
It may be useful to allow to force broken opening braces of braced extern "C" statments, especially for software srouce code following allman/bsd brace style.

Something like:
--break-extern-c
Dettach braces to a braced extern "C" statement. This is done regardless of the brace style being used. This option is effective for C++ files only.

An extern "C" statement that is part of a function definition is formatted according to the requested brace style. Braced extern "C" statements are unaffected by the brace style and this option is the only way to change them.

this option breaks braces from a braced extern "C" statement:

#ifdef __cplusplus
extern "C" {
    #include <required_cpp_only_header>
#endif

becomes

#ifdef __cplusplus
extern "C"
{
    #include <required_cpp_only_header>
#endif

Discussion


Log in to post a comment.