Some of Clang's warnings, such as this one, are disabled if the code comes
from a macro expansion. This is why you see the warning only if you first
expand the code.
If your concern is just related to distributed compiling, either build
without -Werror, or use icecc/icecream, which generally distributes the
builds without preprocessing first.
You can also use -frewrite-includes to avoid a full preprocessing (rather than -E). I’m not sure if this necessarily gets you exact warning reproducibility, but closer.
> Questions:
> - Is this report of unused value legit? GCC doesn't warn anything on the
> same snippet. - Is this behavior expected? Why does the warning throw up
> only when the end user wants to do anything with the intermediate
> outputs? I ended up here because this was failing my project when I was
> trying to use distcc.
>
>
>
> Cheers!
>
> Nehal J Wani