[llvm-commits] [llvm] r150508 - /llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp

Chandler Carruth chandlerc at google.com
Thu Feb 16 02:02:24 PST 2012


On Tue, Feb 14, 2012 at 1:48 PM, Aaron Ballman <aaron at aaronballman.com>wrote:

> On Tue, Feb 14, 2012 at 3:39 PM, Matt Beaumont-Gay <matthewbg at google.com>
> wrote:
> > On Tue, Feb 14, 2012 at 13:29, Aaron Ballman <aaron at aaronballman.com>
> wrote:
> >> Author: aaronballman
> >> Date: Tue Feb 14 15:29:32 2012
> >> New Revision: 150508
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=150508&view=rev
> >> Log:
> >> Fixing warning due to the new "UTD return type in extern 'C'".
> >>
> >> Patch by Matt Johnson
> >>
> >> Modified:
> >>    llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
> >>
> >> Modified:
> llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
> >> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=150508&r1=150507&r2=150508&view=diff
> >>
> ==============================================================================
> >> --- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
> (original)
> >> +++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
> Tue Feb 14 15:29:32 2012
> >> @@ -297,10 +297,14 @@
> >>  //  Functions "exported" to the running application...
> >>  //
> >>
> >> -// Visual Studio warns about returning GenericValue in extern "C"
> linkage
> >> +// Visual Studio and Clang warn about returning GenericValue in extern
> "C" linkage
> >>  #ifdef _MSC_VER
> >>     #pragma warning(disable : 4190)
> >>  #endif
> >> +#ifdef __clang__
> >> +    #pragma clang diagnostic push
> >> +    #pragma clang diagnostic ignored "-Wreturn-type"
> >
> > Maybe use -Wreturn-type-c-linkage, so we still get other -Wreturn-type
> warnings?
>
> That new thing?  ;-)  r150512, thanks for the catch!


Ugh, this just creates a warning when using a slightly old Clang due to
-Wunknown-pragma.

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....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120216/0a2864af/attachment.html>


More information about the llvm-commits mailing list