[PATCH] D38718: Patch to Bugzilla 20951

2017-10-10 Thread Daniel Marjamäki via Phabricator via cfe-commits
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)) ? (*

[PATCH] D38718: Patch to Bugzilla 20951

2017-10-10 Thread Roman Lebedev via Phabricator via cfe-commits
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

[PATCH] D38718: Patch to Bugzilla 20951

2017-10-10 Thread Erik Viktorsson via Phabricator via cfe-commits
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