danielmarjamaki added a reviewer: danielmarjamaki.
danielmarjamaki added a comment.
I think a test for -Wtautological-pointer-compare should be added that shows
that the bug is fixed.
Comment at: test/Sema/conditional-expr.c:84
+ //char x;
+ return (((x != ((void *) 0)) ? (*
lebedev.ri added inline comments.
Comment at: test/Sema/conditional-expr.c:84
+ //char x;
+ return (((x != ((void *) 0)) ? (*x = ((char) 1)) : (void) ((void *) 0)),
(unsigned long) ((void *) 0)); // expected-warning {{C99 forbids conditional
expressions with only one void sid
erikv created this revision.
Submitting a patch to Bugzilla 20951.
Simply replaced the function call IgnoreImpCasts to IgnoreParenImpCasts which
seems to more appropriate.
I also had to modify a test cast in test/Sema/conditional-expr.c
/E
https://reviews.llvm.org/D38718
Files:
lib/Sema/Se