When a static function is defined inside an OpenMP clause, this warning “function 'foo' has internal linkage but is not defined”. See https://godbolt.org/z/ajKPc36M7
But this warning shouldn’t be issued because the declared variant function is called.
The warning should be generated only when the function is not in an OpenMP clause, or if the function is an implicit base of the declared variant function. This patch does that.