Cool! Thanks! -- Larisse.<br><br><div class="gmail_quote">On Tue, Feb 8, 2011 at 12:31 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="word-wrap: break-word;"><br><div><div class="im"><div>On Feb 8, 2011, at 9:12 AM, Larisse Voufo wrote:</div><br><blockquote type="cite">1 - The documentation for DeclRefExpr says the following:<br>      "<a href="http://clang.llvm.org/doxygen/classA.html" target="_blank">A</a> reference to a declared variable, function, enum, etc."<br>
      Does this mean that DeclRefExprs also refer to types such as a concept's associated type <br>
      (declared with the typename keyword, as a TemplateTypeParmDecl) ?<br></blockquote><div><br></div></div><div>No. Look at the declaration hierarchy: DeclRefExpr stores a value (ValueDecl), but types are TypeDecls. Plus, a type reference is never an expression in the C family of languages.</div>
<div class="im"><br><blockquote type="cite">2 -  How are TypedefTypes related to TypedefDecls, and possibly TemplateTypeParmDecl as well?<br></blockquote><div><br></div></div><div>TypedefType it's a reference to a TypedefDecl that occurs in the source. You can create a small file that has a typedef and refers to it, then look at the generated AST, to see how it works.</div>
<div><br></div><div>TemplateTypeParmDecl is a bit messier, since the corresponding TemplateTypeParmType refers to depth/index rather than a specific declaration. We'd like it to refer to the declaration at some point in the future, but we're not there yet.</div>
<br><blockquote type="cite"><div class="im">3-   I ran into this confusion when I was trying to modify the transformations on calls to concept's associated <br>
      functions and types. I can't decide which one of these methods would be the most appropriate or general <br>      place for the change: TransformDeclRefExpr, or TransformDecl and TransformType (and/or even    <br>

      TransformNestedNameSpecifier).<br>      Basically, I'm trying to say: if the referred type or function (or variable) we are trying to transform is <br>      declared within a concept defn context, then match it to the appropriate concept map, and change <br>

      the type or expression so that it now refers to the corresponding type or function (or variable) as defined<br></div>      within the map context…<br></blockquote><br></div><div>The cleanest approach is probably just to create a new Type for references to associated types; then you can transform that associated type reference specifically.</div>
<div><br></div><div><span style="white-space: pre-wrap;">       </span>- Doug</div><br></div></blockquote></div><br>