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

Matt Beaumont-Gay matthewbg at google.com
Tue Feb 14 13:39:20 PST 2012


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?

-Matt




More information about the llvm-commits mailing list