summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2015-04-25 20:20:04 +0000
committerDavide Italiano <davide@freebsd.org>2015-04-25 20:20:04 +0000
commit3c613d608da68fe34ab45c093f7765a7f83cbdba (patch)
treee8e0365deebd6a4919354f73e9371f6453a9b39d /clang/lib/Sema/SemaDecl.cpp
parent81bd06d787f9934f4ee8bd491b7ea389c9b05019 (diff)
downloadbcm5719-llvm-3c613d608da68fe34ab45c093f7765a7f83cbdba.tar.gz
bcm5719-llvm-3c613d608da68fe34ab45c093f7765a7f83cbdba.zip
[Sema] Check if a builtin is FunctionPrototype().
Don't assume it's always is. This prevents a crash in Sema while trying to merge return type for a builtin w/out function prototype. PR: 23086 Differential Revision: http://reviews.llvm.org/D9235 Reviewed by: rsmith llvm-svn: 235806
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 6916710036c..339280614ff 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -1749,7 +1749,7 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
Loc, Loc, II, R, /*TInfo=*/nullptr,
SC_Extern,
false,
- /*hasPrototype=*/true);
+ R->isFunctionProtoType());
New->setImplicit();
// Create Decl objects for each parameter, adding them to the
OpenPOWER on IntegriCloud