Miscellaneous-NoIfdefInHeaderΒΆ
Except for include guards there shall be no #if[n]def or #if in header files
Required inputs: IR
Rationale
The use of#ifdef in header files is problematic, as it can make
the preprocessing of the header file depend on the order in which headers are included.
This in turn may lead to violations of the One Definition Rule.Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
pp_if_in_header |
Except for include guards there shall be no #if[n]def or #if in header files. |
None |
False |
Options
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.