[cfe-commits] [Patch] Handle overloaded operators in warning about conditional operator precedence

Hans Wennborg hans at chromium.org
Mon Jun 6 09:08:08 PDT 2011


Hi,

This is a follow-up to r132565, and should address the rest of PR9969:

Warn about cases such as

int foo(int a, bool b, int c, int d) {
  return a + b ? c : d; // user probably meant a + (b ? c : d);
}

also when + is an overloaded operator call.


Thanks,
Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: conditional_precedence_overloaded_operators.patch
Type: text/x-patch
Size: 6728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110606/1c2be4de/attachment.bin>


More information about the cfe-commits mailing list