Re: r318456 - Issue -Wempty-body warnings for else blocks

2017-11-20 Thread Hans Wennborg via cfe-commits
Reverted in r318667. See coments on the r318556 thread. On Thu, Nov 16, 2017 at 3:32 PM, Richard Smith via cfe-commits wrote: > This is kicking up false positives on code that does the following: > > #define USED(x) if(x);else > // ... > assert(x); > USED(x); > >

r318667 - Revert r318456 "Issue -Wempty-body warnings for else blocks"

2017-11-20 Thread Hans Wennborg via cfe-commits
Author: hans Date: Mon Nov 20 09:48:54 2017 New Revision: 318667 URL: http://llvm.org/viewvc/llvm-project?rev=318667=rev Log: Revert r318456 "Issue -Wempty-body warnings for else blocks" This caused warnings also when the if or else comes from macros. There was an attempt to fix this

Re: r318456 - Issue -Wempty-body warnings for else blocks

2017-11-16 Thread Richard Smith via cfe-commits
This is kicking up false positives on code that does the following: #define USED(x) if(x);else // ... assert(x); USED(x); It's a bit of a weird pattern, but it occurs in some open-source code and seems easy enough for us to detect (if the semicolon and the preceding token aren't from the same

r318456 - Issue -Wempty-body warnings for else blocks

2017-11-16 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Nov 16 13:26:18 2017 New Revision: 318456 URL: http://llvm.org/viewvc/llvm-project?rev=318456=rev Log: Issue -Wempty-body warnings for else blocks This looks like it was just an oversight. Fixes http://llvm.org/pr35319 Modified: