summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/AST
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-11-19 18:01:14 +0000
committerdim <dim@FreeBSD.org>2011-11-19 18:01:14 +0000
commitfa09afd40854d77a65ec9873200b7baa27629790 (patch)
treeb00e59f52ffd11cd97c8a6b6494b94bc69eb8915 /contrib/llvm/tools/clang/lib/AST
parent91c9f9c59de212075e0866994bd4d631eade390f (diff)
downloadFreeBSD-src-fa09afd40854d77a65ec9873200b7baa27629790.zip
FreeBSD-src-fa09afd40854d77a65ec9873200b7baa27629790.tar.gz
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
Diffstat (limited to 'contrib/llvm/tools/clang/lib/AST')
-rw-r--r--contrib/llvm/tools/clang/lib/AST/ASTContext.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp b/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
index 4624280..0833286 100644
--- a/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
+++ b/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp
@@ -227,8 +227,9 @@ ASTContext::ASTContext(LangOptions& LOpts, SourceManager &SM,
ObjCIdDecl(0), ObjCSelDecl(0), ObjCClassDecl(0),
CFConstantStringTypeDecl(0), ObjCInstanceTypeDecl(0),
FILEDecl(0),
- jmp_bufDecl(0), sigjmp_bufDecl(0), BlockDescriptorType(0),
- BlockDescriptorExtendedType(0), cudaConfigureCallDecl(0),
+ jmp_bufDecl(0), sigjmp_bufDecl(0), ucontext_tDecl(0),
+ BlockDescriptorType(0), BlockDescriptorExtendedType(0),
+ cudaConfigureCallDecl(0),
NullTypeSourceInfo(QualType()),
SourceMgr(SM), LangOpts(LOpts),
AddrSpaceMap(0), Target(t), PrintingPolicy(LOpts),
@@ -6293,6 +6294,15 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context,
return QualType();
}
break;
+ case 'K':
+ assert(HowLong == 0 && !Signed && !Unsigned && "Bad modifiers for 'K'!");
+ Type = Context.getucontext_tType();
+
+ if (Type.isNull()) {
+ Error = ASTContext::GE_Missing_ucontext;
+ return QualType();
+ }
+ break;
}
// If there are modifiers and if we're allowed to parse them, go for it.
OpenPOWER on IntegriCloud