<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Uh, my bad!<br>
    <br>
    I was checking whether such functionality was already implemented by
    running analysis on the sample piece of code provided by the checker
    description in the list, I didn't see any warning, so I assumed it's
    not there.<br>
    <br>
    Thank you very much for the feedback! I'll pick another item from
    the list :)<br>
    <br>
    Goodbye,<br>
    <br>
    --<br>
    Kirill Bobyrev<br class="">
    <a moz-do-not-send="true" href="https://github.com/omtcyf0"
      target="_blank" class="">https://github.com/omtcyf0</a><br>
    <br>
    <div class="moz-cite-prefix">On 9/3/2015 8:39 AM, Anna Zaks wrote:<br>
    </div>
    <blockquote
      cite="mid:E48DCBDF-E676-474E-BBC0-C0623D4DDE16@apple.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div class="">Hi Kirill,</div>
      <div class=""><br class="">
      </div>
      <div class="">The checkPreStmt callback should be used by checkers
        that require symbolic execution. Check out the video of our talk
        for introduction into how that works <a moz-do-not-send="true"
href="http://llvm.org/devmtg/2012-11/videos/Zaks-Rose-Checker24Hours.mp4"
          class="">http://llvm.org/devmtg/2012-11/videos/Zaks-Rose-Checker24Hours.mp4</a>.
        Looks like this checker is only performing a syntactic check, so
        using an AST visitor would be more appropriate <a
          moz-do-not-send="true"
          href="http://clang-analyzer.llvm.org/checker_dev_manual.html#ast"
          class=""><a class="moz-txt-link-freetext" href="http://clang-analyzer.llvm.org/checker_dev_manual.html#ast">http://clang-analyzer.llvm.org/checker_dev_manual.html#ast</a></a>.</div>
      <div class=""><br class="">
      </div>
      <div class="">However, most importantly, similar functionality is
        already implemented in the compiler (see -Wfloat-equal)! Looks
        like it does not work when comparing against a constant. I am
        not sure what the reason for that is; was it a a source of false
        positives or just an oversight.</div>
      <div class=""><br class="">
      </div>
      <div class="">Since the warning is in place, we should remove this
        from the list of checkers to be implemented.</div>
      <div class=""><br class="">
      </div>
      <div class="">Thank you,</div>
      <div class="">Anna.</div>
      <div class=""><br class="">
        <div>
          <blockquote type="cite" class="">
            <div class="">On Sep 2, 2015, at 2:58 PM, Kirill Bobyrev via
              cfe-dev <<a moz-do-not-send="true"
                href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>>
              wrote:</div>
            <br class="Apple-interchange-newline">
            <div class="">
              <div dir="ltr" class="">
                <div bgcolor="#FFFFFF" text="#000000" class=""> I've
                  started implementing different.FloatingCompare checker
                  from the <a moz-do-not-send="true"
                    href="http://clang-analyzer.llvm.org/potential_checkers.html"
                    class="">list of potential checkers</a>. I'd like to
                  gather some feedback and do some improvements in order
                  to push the code to the upstream in the near future.</div>
                <div bgcolor="#FFFFFF" text="#000000" class=""><br
                    class="">
                </div>
                <div bgcolor="#FFFFFF" text="#000000" class="">Vassil
                  Vassilev mentioned it might be reasonable if the
                  checker could detect that there is division which
                  might yield precision loss and then detect a check
                  against a 'constant' values.</div>
                <div bgcolor="#FFFFFF" text="#000000" class=""><br
                    class="">
                </div>
                <div bgcolor="#FFFFFF" text="#000000" class="">What do
                  you think? What should be the checker's default
                  behavior?</div>
                <div bgcolor="#FFFFFF" text="#000000" class=""><br
                    class="">
                </div>
                <div bgcolor="#FFFFFF" text="#000000" class="">The first
                  version of checker is attached.</div>
                <div bgcolor="#FFFFFF" text="#000000" class=""> <br
                    class="">
                  --<br class="">
                  Kirill Bobyrev<br class="">
                  <a moz-do-not-send="true"
                    href="https://github.com/omtcyf0" target="_blank"
                    class="">https://github.com/omtcyf0</a><br class="">
                </div>
              </div>
              <span id="cid:2A870EB9-86D3-4EB0-9FA5-635750006BF6"><FloatingCompareChecker.patch></span>_______________________________________________<br
                class="">
              cfe-dev mailing list<br class="">
              <a moz-do-not-send="true"
                href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br
                class="">
              <a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br
                class="">
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
    </blockquote>
    <br>
  </body>
</html>