[cfe-commits] Patch for bug #4175
Chris Lattner
clattner at apple.com
Fri Jun 12 13:53:05 PDT 2009
On Jun 12, 2009, at 10:09 AM, David Majnemer wrote:
> Please understand that this is my first attempt at trying to submit
> something, I apologize if I have done anything wrong.
>
> Anyway, this patch has some changes to the warnings that we could
> emit. I personally felt that alternatives would be harder to read.
> If the patch is not up to snuff, I would be more than happy to try
> to fix it.
Hi David,
This looks nice to me, but it looks like you have some 4-space
indentation in the patch:
+ if (rType->isFunctionPointerType() || lType-
>isFunctionPointerType()) {
+ if (isRelational) {
+ Diag(Loc,
diag::ext_typecheck_ordered_comparison_of_function_pointers)
+ << lType << rType << lex->getSourceRange() << rex-
>getSourceRange();
+ }
+ }
+ if (((!LHSIsNull || isRelational) && LCanPointeeTy-
>isVoidType()) !=
+ ((!RHSIsNull || isRelational) && RCanPointeeTy-
>isVoidType())) {
+ Diag(Loc, diag::ext_typecheck_comparison_of_distinct_pointers)
+ << lType << rType << lex->getSourceRange() << rex-
>getSourceRange();
+ }
// Simple check: if the pointee types are identical, we're done.
Please change this to indent by 2, include a testcase and I'll apply
it for you.
Thanks!
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090612/7a699b9e/attachment.html>
More information about the cfe-commits
mailing list