From 01dbf6a0ebc5520420ce114cef309570881e3c0c Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 22 Dec 2014 17:54:25 +0000 Subject: [PATCH] Simplify test for rdar://19256338 (from patch r224549). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224713 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Sema/warn-tautological-compare.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/test/Sema/warn-tautological-compare.c b/test/Sema/warn-tautological-compare.c index 247e740639..55de6179a3 100644 --- a/test/Sema/warn-tautological-compare.c +++ b/test/Sema/warn-tautological-compare.c @@ -78,17 +78,9 @@ void test3() { } // rdar://19256338 -#define SAVE_READ(PTR, RESULT) if( (PTR) && *(PTR) ) *RESULT=*PTR; - -// Source -typedef unsigned char Boolean; -struct HTTPClientPrivate +#define SAVE_READ(PTR) if( (PTR) && (&result) ) *result=*PTR; +void _HTTPClientErrorHandler(int me) { - Boolean readSuspended; -}; -typedef struct HTTPClientPrivate * HTTPClientRef; -static void _HTTPClientErrorHandler( HTTPClientRef me) -{ - Boolean result; - SAVE_READ(&me->readSuspended, &result); + int *result; + SAVE_READ(&me); } -- 2.40.0