diff options
| author | Douglas Gregor <dgregor@apple.com> | 2011-01-03 09:37:44 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2011-01-03 09:37:44 +0000 |
| commit | bfe022caa1c522824b4cf9cdda0865cc0dae187d (patch) | |
| tree | 978b1eda94b861fff0bd3567803f7137b3e6201f /clang/lib/Sema/SemaDecl.cpp | |
| parent | 150d2124b2d1714bb9ae85d80b3fe6d999d97f25 (diff) | |
| download | bcm5719-llvm-bfe022caa1c522824b4cf9cdda0865cc0dae187d.tar.gz bcm5719-llvm-bfe022caa1c522824b4cf9cdda0865cc0dae187d.zip | |
When we attempt to create a built-in that involves a library type we
don't have access to (e.g., fprintf, which needs the library type
FILE), fail with a warning and forget about the builtin
entirely. Previously, we would actually provide an error, which breaks
autoconf's super-lame checks for fprintf, longjmp, etc. Fixes PR8316.
llvm-svn: 122744
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index abd63198d47..32791f9f983 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -793,13 +793,13 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned bid, case ASTContext::GE_Missing_stdio: if (ForRedeclaration) - Diag(Loc, diag::err_implicit_decl_requires_stdio) + Diag(Loc, diag::warn_implicit_decl_requires_stdio) << Context.BuiltinInfo.GetName(BID); return 0; case ASTContext::GE_Missing_setjmp: if (ForRedeclaration) - Diag(Loc, diag::err_implicit_decl_requires_setjmp) + Diag(Loc, diag::warn_implicit_decl_requires_setjmp) << Context.BuiltinInfo.GetName(BID); return 0; } |

