<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Same here. Everyone makes mistakes = ). But seriously building before committing is good = p. (Paranoia can be an asset sometimes ; ).</div><div><br></div><div>Michael</div><br><div><div>On Dec 31, 2012, at 8:33 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_default" style="">No biggie. =] I only reverted to get the bots moving again.</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sun, Dec 30, 2012 at 10:27 PM, Will Dietz <span dir="ltr"><<a href="mailto:wdietz2@illinois.edu" target="_blank">wdietz2@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'll commit fixed version shortly.<br>
<br>
Very sorry, and understood regarding not breaking the build being paramount.<br>
<br>
Happened due to machine I commit from not being the same as the one I<br>
develop (and test) on for reasons not worth going into.  I'll fix that<br>
so this won't happen again.<br>
<br>
Sincerely,<br>
<br>
~Will<br>
<div class="HOEnZb"><div class="h5"><br>
On Mon, Dec 31, 2012 at 12:18 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>
> This breaks everyone's build -- this just doesn't compile.<br>
><br>
> I've reverted this in r171277 until Will can look at it. Will, please double<br>
> check that you've built successfully before re-committing it.<br>
><br>
><br>
> On Sun, Dec 30, 2012 at 10:05 PM, Michael Gottesman <<a href="mailto:mgottesman@apple.com">mgottesman@apple.com</a>><br>
> wrote:<br>
>><br>
>> This causes a build failure on Darwin:<br>
>><br>
>> compiler-rt/lib/ubsan/ubsan_handlers.cc:107:10: error: use of undeclared<br>
>> identifier 'Loc'<br>
>>     Diag(Loc, DL_Error,<br>
>>          ^<br>
>> compiler-rt/lib/ubsan/ubsan_handlers.cc:112:10: error: use of undeclared<br>
>> identifier 'Loc'<br>
>>     Diag(Loc, DL_Error,<br>
>><br>
>> I noticed in the function handleTypeMismatchImpl you explicitly grab Loc<br>
>> so I am assuming this is an error in your code.<br>
>><br>
>> Can you fix this?<br>
>><br>
>> Michael<br>
>><br>
>> On Dec 31, 2012, at 4:20 AM, Will Dietz <<a href="mailto:wdietz2@illinois.edu">wdietz2@illinois.edu</a>> wrote:<br>
>><br>
>> Author: wdietz2<br>
>> Date: Sun Dec 30 20:20:55 2012<br>
>> New Revision: 171273<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=171273&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=171273&view=rev</a><br>
>> Log:<br>
>> [ubsan] Don't suggest casting to unsigned for unsigned unary minus<br>
>> overflow.<br>
>><br>
>> Modified:<br>
>>    compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp<br>
>>    compiler-rt/trunk/lib/ubsan/ubsan_handlers.cc<br>
>><br>
>> Modified:<br>
>> compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp?rev=171273&r1=171272&r2=171273&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp?rev=171273&r1=171272&r2=171273&view=diff</a><br>

>><br>
>> ==============================================================================<br>
>> --- compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp<br>
>> (original)<br>
>> +++ compiler-rt/trunk/lib/ubsan/lit_tests/Integer/negate-overflow.cpp Sun<br>
>> Dec 30 20:20:55 2012<br>
>> @@ -1,7 +1,12 @@<br>
>> -// RUN: %clang -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 |<br>
>> FileCheck %s<br>
>> +// RUN: %clang -fsanitize=signed-integer-overflow %s -o %t && %t 2>&1 |<br>
>> FileCheck %s --check-prefix=CHECKS<br>
>> +// RUN: %clang -fsanitize=unsigned-integer-overflow %s -o %t && %t 2>&1 |<br>
>> FileCheck %s --check-prefix=CHECKU<br>
>><br>
>> int main() {<br>
>> +  // CHECKS-NOT: runtime error<br>
>> +  // CHECKU: negate-overflow.cpp:[[@LINE+2]]:3: runtime error: negation<br>
>> of 2147483648 cannot be represented in type 'unsigned int'<br>
>> +  // CHECKU-NOT: cast to an unsigned<br>
>>   -unsigned(-0x7fffffff - 1); // ok<br>
>> -  // CHECK: negate-overflow.cpp:6:10: runtime error: negation of<br>
>> -2147483648 cannot be represented in type 'int'; cast to an unsigned type to<br>
>> negate this value to itself<br>
>> +  // CHECKS: negate-overflow.cpp:[[@LINE+2]]:10: runtime error: negation<br>
>> of -2147483648 cannot be represented in type 'int'; cast to an unsigned type<br>
>> to negate this value to itself<br>
>> +  // CHECKU-NOT: runtime error<br>
>>   return -(-0x7fffffff - 1);<br>
>> }<br>
>><br>
>> Modified: compiler-rt/trunk/lib/ubsan/ubsan_handlers.cc<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_handlers.cc?rev=171273&r1=171272&r2=171273&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_handlers.cc?rev=171273&r1=171272&r2=171273&view=diff</a><br>

>><br>
>> ==============================================================================<br>
>> --- compiler-rt/trunk/lib/ubsan/ubsan_handlers.cc (original)<br>
>> +++ compiler-rt/trunk/lib/ubsan/ubsan_handlers.cc Sun Dec 30 20:20:55 2012<br>
>> @@ -103,10 +103,15 @@<br>
>><br>
>> void __ubsan::__ubsan_handle_negate_overflow(OverflowData *Data,<br>
>>                                              ValueHandle OldVal) {<br>
>> -  Diag(Data->Loc, DL_Error,<br>
>> -       "negation of %0 cannot be represented in type %1; "<br>
>> -       "cast to an unsigned type to negate this value to itself")<br>
>> -    << Value(Data->Type, OldVal) << Data->Type;<br>
>> +  if (Data->Type.isSignedIntegerTy())<br>
>> +    Diag(Loc, DL_Error,<br>
>> +         "negation of %0 cannot be represented in type %1; "<br>
>> +         "cast to an unsigned type to negate this value to itself")<br>
>> +      << Value(Data->Type, OldVal) << Data->Type;<br>
>> +  else<br>
>> +    Diag(Loc, DL_Error,<br>
>> +         "negation of %0 cannot be represented in type %1")<br>
>> +      << Value(Data->Type, OldVal) << Data->Type;<br>
>> }<br>
>> void __ubsan::__ubsan_handle_negate_overflow_abort(OverflowData *Data,<br>
>>                                                     ValueHandle OldVal) {<br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
>><br>
><br>
</div></div></blockquote></div><br></div></div>
</blockquote></div><br></body></html>