[llvm-dev] -Wswitch-bool?

Krzysztof Parzyszek via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 29 09:53:27 PDT 2016


On 3/29/2016 11:44 AM, Max Ruttenberg via llvm-dev wrote:
>
> I've looked online and saw some post mentioning that this warning is named
> "switch-bool" but clang doesn't seem to know that.

You're probably using an old clang. There is an option 
"-Wno-switch-bool" that turns this warning off, but if your clang does 
not understand it, there may be no other way of disabling it. 
Alternatively, you could try -w, but that would turn off all warnings.

If you can change the source, you could make it "switch ((int)(argc == 2))".

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation


More information about the llvm-dev mailing list