From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001
From: dim <dim@FreeBSD.org>
Date: Sun, 20 Feb 2011 13:06:31 +0000
Subject: Vendor import of clang trunk r126079:
 http://llvm.org/svn/llvm-project/cfe/trunk@126079

---
 test/Sema/knr-def-call.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

(limited to 'test/Sema/knr-def-call.c')

diff --git a/test/Sema/knr-def-call.c b/test/Sema/knr-def-call.c
index 66f2ec0..d054a04 100644
--- a/test/Sema/knr-def-call.c
+++ b/test/Sema/knr-def-call.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -Wconversion -Wliteral-conversion -fsyntax-only -verify %s
 
 // C DR #316, PR 3626.
 void f0(a, b, c, d) int a,b,c,d; {}
@@ -23,7 +23,19 @@ void f4() {
 }
 
 char *rindex(s, c)
-     register char *s, c; // expected-warning{{promoted type 'char *' of K&R function parameter is not compatible with the parameter type 'char const *' declared in a previous prototype}}
+     register char *s, c; // expected-warning{{promoted type 'char *' of K&R function parameter is not compatible with the parameter type 'const char *' declared in a previous prototype}}
 {
   return 0;
 }
+
+// PR8314
+void proto(int);
+void proto(x) 
+     int x;
+{
+}
+
+void use_proto() {
+  proto(42.0); // expected-warning{{implicit conversion turns literal floating-point number into integer}}
+  (&proto)(42.0); // expected-warning{{implicit conversion turns literal floating-point number into integer}}
+}
-- 
cgit v1.1