diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-05-05 21:18:06 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-05-05 21:18:06 +0000 |
| commit | 00e2607de24eb9fb024ce17181541f413be28b3d (patch) | |
| tree | abc2e02330ac8359aaab3187a213abaeee98327a /clang/Driver/clang.cpp | |
| parent | 31ce28c56194f4708425bef94ab84b078ec12125 (diff) | |
| download | bcm5719-llvm-00e2607de24eb9fb024ce17181541f413be28b3d.tar.gz bcm5719-llvm-00e2607de24eb9fb024ce17181541f413be28b3d.zip | |
Add support for -Wimplicit-function-declaration, rdar://5907433
llvm-svn: 50672
Diffstat (limited to 'clang/Driver/clang.cpp')
| -rw-r--r-- | clang/Driver/clang.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index e7dacc44fd4..96f6dde1ec9 100644 --- a/clang/Driver/clang.cpp +++ b/clang/Driver/clang.cpp @@ -475,6 +475,9 @@ static llvm::cl::opt<bool> WarnUndefMacros("Wundef", llvm::cl::desc("Warn on use of undefined macros in #if's")); +static llvm::cl::opt<bool> +WarnImplicitFunctionDeclaration("Wimplicit-function-declaration" + "Warn about use of implicitly defined functions"); /// InitializeDiagnostics - Initialize the diagnostic object, based on the /// current command line option settings. @@ -498,6 +501,10 @@ static void InitializeDiagnostics(Diagnostic &Diags) { if (!WarnUndefMacros) Diags.setDiagnosticMapping(diag::warn_pp_undef_identifier,diag::MAP_IGNORE); + if (!WarnImplicitFunctionDeclaration) + Diags.setDiagnosticMapping(diag::warn_implicit_function_decl, + diag::MAP_IGNORE); + if (MSExtensions) // MS allows unnamed struct/union fields. Diags.setDiagnosticMapping(diag::w_no_declarators, diag::MAP_IGNORE); |

