You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RULE-5-10-1 reports false positives on compiler-predefined function identifiers (__func__, __FUNCTION__, __PRETTY_FUNCTION__) #1170
The query flags the compiler-predefined function identifiers __func__, __FUNCTION__ and __PRETTY_FUNCTION__ for "contains double underscores" / "starts with underscore". These are not user-defined
identifiers — __func__ is mandated by the C++ standard ([dcl.fct.def.general]) and FUNCTION/PRETTY_FUNCTION` are GCC/Clang extensions — so RULE-5-10-1 (which is scoped to user-defined identifiers) should not report them.
Example
The compiler synthesizes one such static const char __PRETTY_FUNCTION__[] = "..." inside every function that
references it. These references very often come from assert-style macros (e.g. an ASSERT_MESSAGE(...) macro that embeds __PRETTY_FUNCTION__), so the synthesized variable is attributed to each macro invocation site in user
code. The result is one false positive per macro usage.
Activity
Fix RULE-5-10-1 false positives on compiler-predefined function ident…
Fix RULE-5-10-1 false positives on compiler-predefined function ident…