CLang. How to turn on reference to pointer errors


In XCode I declare a function

void func (const Valu & val);

And when I mistakenly pass a pointer instead of a reference to an object, the compiler does not issue an error or warning message. But it generates incorrect code.
How do I enable this error or warning message?


Can you send a more complete example of what you want to warn? If you try to pass a pointer to that function, you should get an error that there is no matching call:

My money is on Valu being a template parameter.