From 36c49e3f258dced101949edabd72e9bc3f1dedc4 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 17 Sep 2010 15:54:40 +0000 Subject: Vendor import of clang r114020 (from the release_28 branch): http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor) --- test/Sema/exprs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/Sema/exprs.c') diff --git a/test/Sema/exprs.c b/test/Sema/exprs.c index 9d3da90..56a52be 100644 --- a/test/Sema/exprs.c +++ b/test/Sema/exprs.c @@ -145,5 +145,8 @@ void test19() { int test20(int x) { return x && 4; // expected-warning {{use of logical && with constant operand; switch to bitwise & or remove constant}} - return x && sizeof(int) == 4; // no warning. + return x && sizeof(int) == 4; // no warning, RHS is logical op. + + // no warning, this is an idiom for "true" in old C style. + return x && (signed char)1; } -- cgit v1.1