nl_squeeze_ifdef_top_level
Makes the nl_squeeze_ifdef option affect the top-level #ifdefs
as well.
Here "top-level ifdefs" probably means something defined at global scope (outside brackets).
Possible values are true and false, default false.
Examples
true
Config:
nl_squeeze_ifdef = true
nl_squeeze_ifdef_top_level = true
Before:
#if defined SMALL_SIZE
buf_size = 10;
#else
buf_size = 100;
#endif
int main()
{
std::cout << "Buffer will be " << buf_size << '\n';
#if defined SMALL_SIZE
std::cout << "small size" << '\n';
#endif
return 0;
}
After
#if defined SMALL_SIZE
buf_size = 10;
#else
buf_size = 100;
#endif
int main()
{
std::cout << "Buffer will be " << buf_size << '\n';
#if defined SMALL_SIZE
std::cout << "small size" << '\n';
#endif
return 0;
}
false
Example remains unchanged.
See also
- nl_squeeze_ifdef: Whether to remove blanks after
#ifxx
and#elxx
, or before#elxx
and#endif
. - nl_after_case: Whether to add a newline after a
case
statement. - nl_after_if: Add or remove blank line after
if
statement. - nl_before_case: Whether to add a newline before
case
, and a blank line before acase
statement that follows a;
or}
.