REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9235

Files:
  cfe/trunk/lib/Sema/SemaDecl.cpp
  cfe/trunk/test/Sema/crash-invalid-builtin.c

Index: cfe/trunk/lib/Sema/SemaDecl.cpp
===================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp
+++ cfe/trunk/lib/Sema/SemaDecl.cpp
@@ -1749,7 +1749,7 @@
                                            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
Index: cfe/trunk/test/Sema/crash-invalid-builtin.c
===================================================================
--- cfe/trunk/test/Sema/crash-invalid-builtin.c
+++ cfe/trunk/test/Sema/crash-invalid-builtin.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s
+// PR23086
+
+__builtin_isinf(...); // expected-warning {{type specifier missing, defaults 
to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // 
expected-error {{conflicting types for '__builtin_isinf'}} // expected-note 
{{'__builtin_isinf' is a builtin with type 'int ()'}}

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
Index: cfe/trunk/lib/Sema/SemaDecl.cpp
===================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp
+++ cfe/trunk/lib/Sema/SemaDecl.cpp
@@ -1749,7 +1749,7 @@
                                            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
Index: cfe/trunk/test/Sema/crash-invalid-builtin.c
===================================================================
--- cfe/trunk/test/Sema/crash-invalid-builtin.c
+++ cfe/trunk/test/Sema/crash-invalid-builtin.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s
+// PR23086
+
+__builtin_isinf(...); // expected-warning {{type specifier missing, defaults to 'int'}} expected-error {{ISO C requires a named parameter before '...'}} // expected-error {{conflicting types for '__builtin_isinf'}} // expected-note {{'__builtin_isinf' is a builtin with type 'int ()'}}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to