Miscellaneous-NoEmptyLoopsΒΆ
Loops must not be empty
Required inputs: IR
Example
for (int i = 0; i < 10; i++); // bad
while (1); // bad
do {} while (1); // bad
for (;;) { break; } // ok
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
empty_loop |
Loops must not be empty. |
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.