<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I am certainly planning to invest some time writing blog
      posts/scripts to make clang-tidy checks easier to use. Giving a
      talk seems a bit impossible in the near future, as there isn't
      much interest in clang in my local community (hope that this
      changes).</p>
    <p>Also, I have written <a moz-do-not-send="true"
        href="https://github.com/micjabbour/pronto-clang_format">some</a>
      <a moz-do-not-send="true"
        href="https://github.com/micjabbour/pronto-clang_tidy">scripts</a>
      (that are meant to be used in continuous integration) to get
      clang-tidy/clang-format output as comments in popular web-based
      git repo managers (e.g. github, gitlab, bitbucket, ...). This can
      help enforce some coding conventions when reviewing code changes.
      Here is a screenshot on gitlab (I'll be deploying this into
      production soon):</p>
    <img moz-do-not-send="false"
      src="cid:part3.65C2CC2D.0D609CE6@gmail.com" alt="" height="454"
      width="998"><br>
    <br>
    <p>Sorry for the long email, Just wanted to share my enthusiasm :D<br>
    </p>
    Thanks again,<br>
    Mike<br>
    <br>
    <div class="moz-cite-prefix">On 07/07/2018 6:04 PM, Manuel Klimek
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOsfVvkaru0AEtuwHNDBkwOxTSR04rzOzdJof3=nSXsMyC9Fow@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="auto">
        <div>Thanks! You can pay that back by giving a talk about clang
          tooling from a user's point of view at some point, as you seem
          to have mastered the subject :)<br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr">On Sat, 7 Jul 2018, 17:23 Michael Jabbour,
              <<a href="mailto:micjabbour@gmail.com"
                moz-do-not-send="true">micjabbour@gmail.com</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF">
                <p>Thanks for the confirmation. I have learned a lot
                  from your great talks/presentations :-)</p>
                <p>Thanks,</p>
                <p>Mike<br>
                </p>
                <br>
                <div class="m_8325414720516619607moz-cite-prefix">On
                  06/07/2018 11:03 AM, Manuel Klimek wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="auto">That's what I'd do, too.</div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr">On Fri, 6 Jul 2018, 00:50 Michael
                      Jabbour via cfe-dev, <<a
                        href="mailto:cfe-dev@lists.llvm.org"
                        target="_blank" rel="noreferrer"
                        moz-do-not-send="true">cfe-dev@lists.llvm.org</a>>
                      wrote:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text="#000000" bgcolor="#FFFFFF">
                        <p>I ended up writing my matcher like this:</p>
                        <p><tt>integerLiteral(</tt><tt><br>
                          </tt><tt>  expr().bind("literal"),</tt><tt>      
                            //inline bind call using a redundant node
                            matcher<br>
                          </tt><tt>  hasAncestor(                 
                            //climb up the AST to the nearest varDecl</tt><tt>
                            ancestor<br>
                          </tt><tt>   
varDecl(hasInitializer(ignoringParenCasts(equalsBoundNode("literal"))))   
                            //check that this varDecl satisfies the
                            original condition</tt><tt><br>
                          </tt><tt>  )</tt><tt><br>
                          </tt><tt>)</tt></p>
                        <p>Any feedback is appreciated, as I am
                          completely new to LibTooling...</p>
                        <p>P.S.: The actual matcher I am working on is
                          far more complicated. Inverting it (i.e. using
                          my very first example) would result in much
                          more difficult problems. Although this seems
                          like a roundabout hack, it might be effective
                          when nested inside matchers that have already
                          been tested</p>
                        <p>Thanks,</p>
                        <p>Mike<br>
                        </p>
                        <br>
                        <div
                          class="m_8325414720516619607m_8964194433787506763moz-cite-prefix">On
                          05/07/2018 7:31 PM, Michael Jabbour wrote:<br>
                        </div>
                        <blockquote type="cite">
                          <p>Hello all,<br>
                          </p>
                          <p>When using has*() it is sometimes desirable
                            to use ignoringParenCasts(), for example
                            (from the docs):</p>
                          <pre style="color:rgb(34,34,34);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">varDecl(hasInitializer(ignoringParenCasts(integerLiteral())))</pre>
                          <p>Is there any way to get the same effect
                            when hasParent(), e.g.:</p>
                          <pre style="color:rgb(34,34,34);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">integerLiteral(hasParent(ignoringParenCasts(varDecl())))</pre>
                          <p>Obviously this does not work, but what is
                            the best way to achieve a similar effect?</p>
                          <p>cheers,</p>
                          <p>Mike<br>
                          </p>
                        </blockquote>
                        <br>
                      </div>
                      _______________________________________________<br>
                      cfe-dev mailing list<br>
                      <a href="mailto:cfe-dev@lists.llvm.org"
                        rel="noreferrer noreferrer" target="_blank"
                        moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br>
                      <a
                        href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
                        rel="noreferrer noreferrer noreferrer"
                        target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
                    </blockquote>
                  </div>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>