[cfe-dev] CLang. How to turn on reference to pointer errors

Keane, Erich via cfe-dev cfe-dev at lists.llvm.org
Wed Feb 17 07:06:34 PST 2021


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:

https://godbolt.org/z/efh94z

-----Original Message-----
From: cfe-dev <cfe-dev-bounces at lists.llvm.org> On Behalf Of Andrey Sharoyko via cfe-dev
Sent: Wednesday, February 17, 2021 7:02 AM
To: cfe-dev at lists.llvm.org
Subject: [cfe-dev] CLang. How to turn on reference to pointer errors

Hi.

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?

Thanks,
Andrey.
_______________________________________________
cfe-dev mailing list
cfe-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


More information about the cfe-dev mailing list