Miscellaneous-NoUnsafeMacroΒΆ
Do not use macro definitions with parameters or expressions without parentheses around them
Required inputs: IR
#define MUL(A, B) ((A) * (B))Macros that lack parentheses may parse in unexpected ways when used in certain contexts.
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
unsafe_macro_body |
Macro replacement text potentially must be parenthesized. |
None |
False |
unsafe_macro_param |
Macro argument(s) must be parenthesized. |
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.