<div class="gmail_quote">On Tue, Feb 14, 2012 at 1:48 PM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Tue, Feb 14, 2012 at 3:39 PM, Matt Beaumont-Gay <<a href="mailto:matthewbg@google.com">matthewbg@google.com</a>> wrote:<br>
> On Tue, Feb 14, 2012 at 13:29, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br>
>> Author: aaronballman<br>
>> Date: Tue Feb 14 15:29:32 2012<br>
>> New Revision: 150508<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=150508&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=150508&view=rev</a><br>
>> Log:<br>
>> Fixing warning due to the new "UTD return type in extern 'C'".<br>
>><br>
>> Patch by Matt Johnson<br>
>><br>
>> Modified:<br>
>>    llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp<br>
>><br>
>> Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=150508&r1=150507&r2=150508&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=150508&r1=150507&r2=150508&view=diff</a><br>

>> ==============================================================================<br>
>> --- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (original)<br>
>> +++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Tue Feb 14 15:29:32 2012<br>
>> @@ -297,10 +297,14 @@<br>
>>  //  Functions "exported" to the running application...<br>
>>  //<br>
>><br>
>> -// Visual Studio warns about returning GenericValue in extern "C" linkage<br>
>> +// Visual Studio and Clang warn about returning GenericValue in extern "C" linkage<br>
>>  #ifdef _MSC_VER<br>
>>     #pragma warning(disable : 4190)<br>
>>  #endif<br>
>> +#ifdef __clang__<br>
>> +    #pragma clang diagnostic push<br>
>> +    #pragma clang diagnostic ignored "-Wreturn-type"<br>
><br>
> Maybe use -Wreturn-type-c-linkage, so we still get other -Wreturn-type warnings?<br>
<br>
</div></div>That new thing?  ;-)  r150512, thanks for the catch!</blockquote><div><br></div><div>Ugh, this just creates a warning when using a slightly old Clang due to -Wunknown-pragma.</div><div><br></div><div>We should probably fix -Wunknown-pragma to not fire on diagnostic pragmas where the diagnostic named isn't known to Clang so that we can survive version skew in warning names.... </div>
</div>