HomeFreeBSD

cstyle: understand basic top-level macro invocations

Description

cstyle: understand basic top-level macro invocations

We quite often invoke macros outside of functions, usually to generate
functions or data. cstyle inteprets these as function headers, which at
least have opinions for indenting.

This introduces a separate state for top-level macro invocations, and
excludes it from matching functions. For the moment, most of the
existing rules will continue to apply, but this gives us a way to add or
removes rules targeting macros specifically.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16840

Details

Provenance
rob.norris_klarasystems.comAuthored on Dec 4 2024, 6:48 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Dec 6 2024, 4:53 PM
Parents
rGa44eaf16909a: Optimize RAIDZ expansion
Branches
Unknown
Tags
Unknown