[Qt-creator] Clang Code Model: add -Wno-padded

Christian Kandeler christian.kandeler at theqtcompany.com
Fri Mar 4 09:46:34 CET 2016


On 03/03/2016 10:22 PM, Andrzej Telszewski wrote:
> I do think that having this kind of information is useful, but in my
> opinion -Wno-padded should be default, and turning on the warning should
> be left to those who need it. I personally added -Wno-padded to the
> clang model settings.
>
> Say you have a struct like that:
> struct nopad
> {
>    bool flag1;
>    bool flag2;
> };

Not to mention that the warning becomes completely pointless with C++ 
classes containing virtual functions etc. In my experience, the 
false-positive rate is 100%.


Christian



More information about the Qt-creator mailing list