[cfe-dev] How can I get the token end column using libclang?

chuang lichuang1982 at gmail.com
Sun Sep 28 22:50:41 PDT 2014


The function clang_getInstantiationLocation can only get the start column
of the token in the source file, I try to use spell or display name string
length plus start column to get the end column,but if the token is in a
namespace,the spell or the display name will add namespace prefix:

namespace Table {
    class Iterator {
    // ...
    };
};

When parse "Iterator" token, it's spell name is Table::Iterator.

Is there anyone has way to get the end column of the token?Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140929/d9be96b6/attachment.html>


More information about the cfe-dev mailing list