From fa09afd40854d77a65ec9873200b7baa27629790 Mon Sep 17 00:00:00 2001 From: dim Date: Sat, 19 Nov 2011 18:01:14 +0000 Subject: Pull in r144505 from upstream clang trunk: Fix the signature of the getcontext builtin, eliminating incorrect warnings about its prototype. This also adds a -W(no-)builtin-requires-header option, which can be used to enable or disable warnings of this kind. MFC after: 1 week --- contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp') diff --git a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp b/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp index 8d993ef..d90a821 100644 --- a/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp +++ b/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp @@ -1305,6 +1305,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned bid, Diag(Loc, diag::warn_implicit_decl_requires_setjmp) << Context.BuiltinInfo.GetName(BID); return 0; + + case ASTContext::GE_Missing_ucontext: + if (ForRedeclaration) + Diag(Loc, diag::warn_implicit_decl_requires_ucontext) + << Context.BuiltinInfo.GetName(BID); + return 0; } if (!ForRedeclaration && Context.BuiltinInfo.isPredefinedLibFunction(BID)) { @@ -3635,6 +3641,8 @@ Sema::ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *NewTD, Context.setjmp_bufDecl(NewTD); else if (II->isStr("sigjmp_buf")) Context.setsigjmp_bufDecl(NewTD); + else if (II->isStr("ucontext_t")) + Context.setucontext_tDecl(NewTD); else if (II->isStr("__builtin_va_list")) Context.setBuiltinVaListType(Context.getTypedefType(NewTD)); } -- cgit v1.1