Miscellaneous-NoFriendClassΒΆ
Friend type declarations shall not be used
Required inputs: IR
Example
class A {};
class B { friend class A; }; // Non-Compliant
class C
{
friend C f( void ); // Compliant - not a type declaration
};
Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
friend_class |
Do not use friend type declarations. |
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.