[cfe-commits] [PATCH] for bug 8181 (!&f compiles regardless of whether 'f' is overloaded)
Faisal Vali
faisalv at yahoo.com
Sat Sep 18 11:20:07 PDT 2010
This patch fixes the following bug(http://llvm.org/bugs/show_bug.cgi?id=8181):
Clang compiles the following code when it should not:
void f(); void f(int);
bool b = !&f;
The fix involves checking to see if the operand to '!' is an overloaded type,
and to try and resolve it via a call to 'PerformContextuallyConvertToBool()'.
I added some test cases, and tested against SemaCXX, Sema, SemaTemplate, CXX
Will appreciate any feedback.
Thanks!
Faisal Vali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR8181-fix-negation-of-address-of-overload.patch
Type: application/octet-stream
Size: 1806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100918/1f126664/attachment.obj>
More information about the cfe-commits
mailing list