Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Creator: How to dismiss semantic warning?
Forum Updated to NodeBB v4.3 + New Features

Creator: How to dismiss semantic warning?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
3 Posts 2 Posters 1.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I'm not aware of such a feature. I'd recommend asking this on the Qt Creator mailing list.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        I'm not aware of such a feature. I'd recommend asking this on the Qt Creator mailing list.

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        @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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved