<div dir="ltr">To the original question:<div>I assume you have been using a 'using' declaration to get equalsBoundNode from the right namespace?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Sep 10, 2013 at 3:50 PM, John Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Dear Shu,<br>
      <br>
      Please send questions like this to the cfe-dev mailing list.  The
      owners of the mailing list should only be contacted for
      administrative questions (e.g., when you need help subscribing or
      unsubscribing to/from the list).<br>
      <br>
      Regards,<br>
      <br>
      John Criswell<br>
      <br>
      <br>
      On 9/10/13 7:47 AM, Shu,Kaikai wrote:<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div>
        <p class="MsoNormal" style="text-align:left;background:white" align="left">
          <b><span lang="EN-US">AST Matcher Reference<u></u><u></u></span></b></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left">
          <span lang="EN-US"><a href="http://clang.llvm.org/docs/LibASTMatchersReference.html" target="_blank">http://clang.llvm.org/docs/LibASTMatchersReference.html</a></span><b><span lang="EN-US"><u></u><u></u></span></b></p>

        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US">in this page, the
            example fellows not work and when compile, error message is
            : error: 'equalsBoundNode' was not declared in this scope<u></u><u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US">I can’t get a way to
            solve this, can someone give me some help? please<u></u><u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <table style="background:white" border="0" cellpadding="0">
          <tbody>
            <tr>
              <td style="padding:3.95pt 3.95pt 3.95pt 3.95pt" valign="top">
                <p class="MsoNormal" style="text-align:left;line-height:12.95pt" align="left"><span lang="EN-US">Matcher<<a href="http://clang.llvm.org/doxygen/classclang_1_1Decl.html" target="_blank">Decl</a>><u></u><u></u></span></p>

              </td>
              <td style="padding:3.95pt 3.95pt 3.95pt 3.95pt" valign="top">
                <p class="MsoNormal" style="line-height:12.95pt"><a name="141082509b7ef0c5_equalsBoundNode1Anchor"><span lang="EN-US">equalsBoundNode</span></a><span lang="EN-US"><u></u><u></u></span></p>
              </td>
              <td style="padding:3.95pt 3.95pt 3.95pt 3.95pt" valign="top">
                <p class="MsoNormal" style="line-height:12.95pt"><span lang="EN-US">std::string ID<u></u><u></u></span></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">Matches if a node equals a previously bound
            node.<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">Matches a node if it equals the node previously
            bound to ID.<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">Given<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">  class X { int a; int b; };<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">recordDecl(<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">    has(fieldDecl(hasName("a"),
            hasType(type().bind("t")))),<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">    has(fieldDecl(hasName("b"),
            hasType(type(equalsBoundNode("t"))))))<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">  matches the class X, as a and b have the same
            type.<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">Note that when multiple matches are involved
            via forEach* matchers,<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">equalsBoundNodes acts as a filter.<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">For example:<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">compoundStmt(<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">    forEachDescendant(varDecl().bind("d")),<u></u><u></u></span></p>

        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">   
            forEachDescendant(declRefExpr(to(decl(equalsBoundNode("d"))))))<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">will trigger a match for each combination of
            variable declaration<u></u><u></u></span></p>
        <p class="MsoNormal" style="text-align:left;background:white" align="left"><span style="font-size:12.0pt;font-family:宋体;color:#222222" lang="EN-US">and reference to that variable declaration
            within a compound statement.<u></u><u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
      </div>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>