summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-05 21:18:06 +0000
committerChris Lattner <sabre@nondot.org>2008-05-05 21:18:06 +0000
commit00e2607de24eb9fb024ce17181541f413be28b3d (patch)
treeabc2e02330ac8359aaab3187a213abaeee98327a /clang/lib
parent31ce28c56194f4708425bef94ab84b078ec12125 (diff)
downloadbcm5719-llvm-00e2607de24eb9fb024ce17181541f413be28b3d.tar.gz
bcm5719-llvm-00e2607de24eb9fb024ce17181541f413be28b3d.zip
Add support for -Wimplicit-function-declaration, rdar://5907433
llvm-svn: 50672
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index ada6ceb68a6..f583ad1606a 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -1268,9 +1268,10 @@ Sema::DeclTy *Sema::ActOnFinishFunctionBody(DeclTy *D, StmtTy *Body) {
/// call, forming a call to an implicitly defined function (per C99 6.5.1p2).
ScopedDecl *Sema::ImplicitlyDefineFunction(SourceLocation Loc,
IdentifierInfo &II, Scope *S) {
- if (getLangOptions().C99) // Extension in C99.
+ // Extension in C99. Legal in C90, but warn about it.
+ if (getLangOptions().C99)
Diag(Loc, diag::ext_implicit_function_decl, II.getName());
- else // Legal in C90, but warn about it.
+ else
Diag(Loc, diag::warn_implicit_function_decl, II.getName());
// FIXME: handle stuff like:
OpenPOWER on IntegriCloud