[cfe-dev] SourceLocation comparisons

Robert Ankeney rrankene at gmail.com
Thu Sep 11 14:41:59 PDT 2014


I understand the macro concern. I am only working with preprocessed code in
a RecursiveASTVisitor, so a full set of comparators would make it easier
for me.

Robert

On Thu, Sep 11, 2014 at 2:37 PM, Nikola Smiljanic <popizdeh at gmail.com>
wrote:

> On Fri, Sep 12, 2014 at 4:46 AM, Robert Ankeney <rrankene at gmail.com>
> wrote:
>
>> Of course I'm assuming the encoded value always increases as you go
>> through the file, which seems to be the case.
>>
>
>
> I don't think that this is necessarily true due to macros. I was told that
> the right way to compare them is with SourceManager::isBeforeInTranslationUnit.
> Hopefully someone can provide a concrete example?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140911/4cdf9254/attachment.html>


More information about the cfe-dev mailing list