<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <br>
    <br>
    <div class="moz-cite-prefix">On 6/16/20 3:56 AM,
      <a class="moz-txt-link-abbreviated" href="mailto:philip.chimento@gmail.com">philip.chimento@gmail.com</a> wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAHbXgc1WOKSj+AdZAzbnjWqTw7L4va_eN7D+-iO7tGTsEwe6Ew@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Sun, Jun 14, 2020 at
              2:05 AM Artem Dergachev <<a
                href="mailto:noqnoqneo@gmail.com" moz-do-not-send="true">noqnoqneo@gmail.com</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div> > How do I get the SVal for the memory pointed to
                by CallEvent::getArgSVal(0)?<br>
                <br>
                ProgramState::getSVal (the overload that accepts the
                location/region).<br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Thanks, that was it. I would never have thought that
              SVal -> SVal::getAsRegion() ->
              ProgramState::getSVal() would have ended up with anything
              but the original SVal, but there it is!</div>
            <div> <br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div> Generally i recommend checking out a few links at
                the bottom of <a
                  href="http://clang-analyzer.llvm.org/checker_dev_manual.html"
                  target="_blank" moz-do-not-send="true">http://clang-analyzer.llvm.org/checker_dev_manual.html</a></div>
            </blockquote>
            <div><br>
            </div>
            <div>Speaking of that... would you be interested in merging
              my PR <a
                href="https://github.com/haoNoQ/clang-analyzer-guide/pull/5"
                moz-do-not-send="true">https://github.com/haoNoQ/clang-analyzer-guide/pull/5</a>
              and some of the other open PRs on the handbook, and
              releasing a new version? Depending on how much of a hassle
              it is, I might be interested to make it publish as HTML to
              GitHub Pages automatically so you wouldn't have to release
              PDFs...<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Ugh, there are countless more outdated paragraphs in there. There
    are even bugs documented that had to be fixed rather than
    documented. I emitted it as an artifact that would have been created
    anyway at some point but i'm personally not planning to maintain it
    further because it's not the right way to do documentation (we'd
    rather have doxygen / rst documentation). Please feel free to fork
    but i'd much rather have it converted to into in-tree documentation
    (say, documentation in chapter 5 could be torn into individual
    doxygen comments).<br>
    <br>
    <blockquote type="cite"
cite="mid:CAHbXgc1WOKSj+AdZAzbnjWqTw7L4va_eN7D+-iO7tGTsEwe6Ew@mail.gmail.com">
      <div dir="ltr">
        <div>
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div>
                <div>14.06.2020 12:05 AM, via cfe-dev wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">
                    <div>Hi list,</div>
                    <div><br>
                    </div>
                    <div>I am writing a static analyzer checker and
                      trying to model a function of the following type
                      in check::PostCall:</div>
                    <div><br>
                    </div>
                    <div>void func(bool* outParam) {</div>
                    <div>    assert(outParam);<br>
                    </div>
                    <div>    *outParam = true;</div>
                    <div>}<br>
                    </div>
                    <div><br>
                    </div>
                    <div>(in real life there are some other inputs that
                      determine the value stored in the out parameter,
                      and a return value indicating whether there was an
                      error, but let's use this for the sake of a simple
                      example)</div>
                    <div><br>
                    </div>
                    <div>Suppose I want my PostCall callback to store
                      "true" in *outParam. Is this possible to achieve
                      with ProgramState::BindExpr or
                      ProgramState::bindLoc? How do I get the SVal for
                      the memory pointed to by CallEvent::getArgSVal(0)?</div>
                    <div><br>
                    </div>
                    <div>I thought of "synthesizing" a UnaryOperator
                      expression using UO_Deref on
                      CallEvent::getArgExpr(0) and passing that to
                      ProgramState::BindExpr, but it seems that
                      getArgExpr returns a const Expr* and a non-const
                      one is required to construct a UnaryOperator
                      expression.</div>
                    <div><br>
                    </div>
                    <div>Best regards,<br>
                    </div>
                    <div>-- <br>
                      <div dir="ltr">Philip</div>
                    </div>
                  </div>
                  <br>
                  <fieldset></fieldset>
                  <pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" moz-do-not-send="true">cfe-dev@lists.llvm.org</a>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank" moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
          <br clear="all">
        </div>
        Regards,<br>
        <div>-- <br>
          <div dir="ltr" class="gmail_signature">Philip</div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>