A function declared at block scope will refer to a member of the enclosing namespace, and so the declaration should be explicitly placed at the
namespace level.
Additionally, where a declaration statement could either declare a function or an object, the compiler will choose to declare the function. To
avoid potential developer confusion over the meaning of a declaration, functions should not be declared at block scope.
Noncompliant code example
class A {
};
void fun() {
void nestedFun(); // Noncompliant; declares a function in block scope
A a(); // Noncompliant; declares a function at block scope, not an object
}