<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 5, 2010, at 12:53 PM, Nimrod Partush wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">These methods might work fine, but what i need is the location of the qualifier. Any idea how do i translate <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">fD->getType() to a SourceLocation?</span></div></blockquote><div><br></div>Clang doesn't keep track of the locations of qualifiers. This could be added to QualifiedTypeLoc, but isn't there now.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">       </span>- Doug</div><div><br></div><div><blockquote type="cite"><div dir="ltr"><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">Your help is greatly appreciated :)<br>

</span></font><br><div class="gmail_quote">On Fri, Nov 5, 2010 at 8:17 PM, Jan Bierbaum <span dir="ltr"><<a href="mailto:s3306700@inf.tu-dresden.de">s3306700@inf.tu-dresden.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Nimrod Partush meinte am 05.11.2010 16:19:<br>
<br>
>>> When asking for the qualifiers of:<br>
>>><br>
>>> const int f();<br>
>>><br>
>>> I get null. Am i doing something wrong?<br>
>><br>
>> Well, you don't say how you do it... ;-)<br>
>><br>
>> Probably you're making the same mistake I did some time ago. What you<br>
>> want is not the qualifiers of the function (it has none) but those of<br>
>> its return type.<br>
><br>
> Well, i tried various ways: Getting the FuncDecl qualifiers, Getting the<br>
> ResultType qualifiers, Getting the TypeLoc and through that...<br>
><br>
> Why don't you tell me how you did it? :)<br>
<br>
I'm not sure if we actually do the same thing. I need to know if the<br>
function returns something that is qualified and use<br>
<br>
FunctionDecl* fD;<br>
...<br>
fD->getType().isConstQualified()<br>
fD->getType().isVolatileQualified()<br>
<br>
But you wrote something about getting NULL which can't happen here. That<br>
is why I was wondering how you try to do it. You could also have a look<br>
at the old thread on this list [1]. Maybe you can use some of the advice<br>
I got.<br>
<br>
<br>
[1] <a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-September/010923.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-September/010923.html</a><br>
<br>
<br>
Regards, Jan.<br>
</blockquote></div><br></div></div>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>