<html>
<head></head>
<body>
<p>Hi,</p>
<p>Thanks Daniel, I suppose you mean CXXRecordDecl::lookupInBases() instead CXXRecordDecl::findInBases().</p>
<p>Have you ever used one of these methods? I don't understand quite well how can I use them for my purpose. What I need is that, given an object CXXRecordDecl, I can analyze something in particular in each one of its base classes (direct or indirect). Thus, I need to get each one of these classes to process them, but the methods you refer only return a <em>bool</em>.</p>
<p>Could you please show me an example using these methods? Mainly, with respect the arguments passed to these methdos.</p>
<p>Thanks,</p>
<p>Pedro.</p>
<div><em>El día 08 nov 2013 15:32, Daniel Jasper <djasper@google.com> escribió:</em></div><blockquote class="replyBlock" style="border-left: 2px solid #000083; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div dir="ltr">Take a look at CXXRecordDecl::forallBases() and CXXRecordDecl::findInBases(). Dependent on what you want to do, one of them might do what you need.<div>Cheers,<br />Daniel</div></div><div class="gmail_extra"><br /><br /><div class="gmail_quote">On Fri, Nov 8, 2013 at 2:39 AM, Pedro Delgado Perez <span dir="ltr"><<a href="mailto:pedro.delgado@uca.es" target="_blank">pedro.delgado@uca.es</a>></span> wrote:<br /><blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><div><p>Hello,</p>
<p>Please, I need some help with an issue I noticed a few days ago and I am not able to solve.</p>
<p>To illustrate my problem, I show this piece of code:</p>
<p>class A{<br />    public:<br />        A(): a(1) {};<br />        int a;<br />};<br /><br />class B: public A{<br />    public:<br />        B(): b(2){};<br />        int b;<br />};<br /><br />class C: public B{<br />    public:<br />        C(): c(3){};<br />        int b;<br />        int a;<br />};</p>
<p>We have three classes, where:<br />B  inherits directly from A<br />C  inherits directly from B and INDIRECTLY from A</p>
<p>Using CXXRecordDecl::base_class_iterator, the classes indirectly inherited are not visited. Please, can someone explain me how to take into account these indirectly inherited base classes? I've been thinking on recursion (use base_class_iterator on each class directly inherited), but I'm sure there should be another simpler way to do this.</p>
<p>Thanks in advance,</p>
<p>Pedro.</p>
</div><br/>
<p>_______________________________________________<br/>
cfe-dev mailing list<br/>
cfe-dev@cs.uiuc.edu</p>
</blockquote></div></div><p><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></p>
</blockquote>
</body>
</html>