Unsolved Creator: How to dismiss semantic warning?
-
So I'm the evil guy who compares two floats. With Clang code model enabled in Creator, I get a semantic warning. That's good, because in 98 % of cases, I have just made a mistake.
Then there is the remaining 2 %...
In my current case, I really want to know whether the two values are identical (bit pattern, and all the works)
Not in the sense that two different calculations might have arrived at the same result (they probably won't), but in the sense that the exact same float (result of exactly one calculation) has, over different routes, arrived at variable a and b, which I now want to compare.How do I disable the semantic warning for that line of code?
-
Hi,
I'm not aware of such a feature. I'd recommend asking this on the Qt Creator mailing list.
-
@SGaist said in Creator: How to dismiss semantic warning?:
Hi,
I'm not aware of such a feature. I'd recommend asking this on the Qt Creator mailing list.
Well, I had to turn off Clang code model anyway, because it tends to lock files while they are being handled by the source code control (see https://bugreports.qt.io/browse/QTCREATORBUG-15929). I'll rely on static code analysis to reveal such semantic errors - and there I know how to make exceptions.