[cfe-commits] r150128 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaDecl.cpp test/SemaCXX/function-extern-c.cpp

Aaron Ballman aaron at aaronballman.com
Wed Feb 8 18:21:14 PST 2012


On Wed, Feb 8, 2012 at 8:12 PM, Matt Beaumont-Gay <matthewbg at google.com> wrote:
> The documentation for the corresponding MSVC warning states:
>
> "This is legal if:
> * All calls to this function occur from C++.
> * The definition of the function is in C++."
>
> For code which triggers the new warning, but is legal per those
> criteria, how does one silence the warning?

You can either pass in -Wno-return-type on the command line or you can
do it ad hoc with #pragma clang diagnostic ignored "-Wreturn-type"

~Aaron



More information about the cfe-commits mailing list