[cfe-commits] [PATCH review request] unused overloaded expression should error

Faisal Vali faisalv at gmail.com
Sun Feb 20 15:30:42 PST 2011


This patch is peripherally related to my previous patch regarding bug 7505.


I stumbled upon the following test code, that should error, but doesn't.

void two() { }
void two(int) { }

int main()
{
  two; // clang emits unused variable warning, but this should be an error -
}

The attached patch ensures that clang produces an error.

Would appreciate any feedback :)
thanks!

Faisal Vali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: address-of-overloaded-function-in-id-expression-stmt.patch
Type: application/octet-stream
Size: 1241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110220/a903624a/attachment.obj>


More information about the cfe-commits mailing list