Retrieving SourceLocation's in LibTool

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Retrieving SourceLocation's in LibTool

Alex Denisov via cfe-dev

Hi,


I was wondering if there was an easy way to retrieve the source information for Type's and Decl's from inside a Clang LibTool? I'm aware that some Type's and Decl's contain the relevant source information, although that doesn't appear to be the case for everything. I am also aware that you can use VisitTypeLoc to parse specific type locations.


However, I was wondering if there is an easier way to do this. For example passing a Type or Decl to a function (when visiting its node) to retrieve the relevant source location attached to it?


Thank you for your time.


Best Regards,

Andrew Gozillon



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Retrieving SourceLocation's in LibTool

Alex Denisov via cfe-dev

https://stackoverflow.com/questions/11083066/getting-the-source-behind-clangs-ast


On 09/01/2018 19:49, Andrew Gozillon via cfe-dev wrote:

Hi,


I was wondering if there was an easy way to retrieve the source information for Type's and Decl's from inside a Clang LibTool? I'm aware that some Type's and Decl's contain the relevant source information, although that doesn't appear to be the case for everything. I am also aware that you can use VisitTypeLoc to parse specific type locations.


However, I was wondering if there is an easier way to do this. For example passing a Type or Decl to a function (when visiting its node) to retrieve the relevant source location attached to it?


Thank you for your time.


Best Regards,

Andrew Gozillon




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Retrieving SourceLocation's in LibTool

Alex Denisov via cfe-dev

2018-01-18 18:34 GMT+00:00 David Come via cfe-dev <[hidden email]>:

https://stackoverflow.com/questions/11083066/getting-the-source-behind-clangs-ast


On 09/01/2018 19:49, Andrew Gozillon via cfe-dev wrote:

Hi,


I was wondering if there was an easy way to retrieve the source information for Type's and Decl's from inside a Clang LibTool? I'm aware that some Type's and Decl's contain the relevant source information, although that doesn't appear to be the case for everything. I am also aware that you can use VisitTypeLoc to parse specific type locations.


However, I was wondering if there is an easier way to do this. For example passing a Type or Decl to a function (when visiting its node) to retrieve the relevant source location attached to it?


Thank you for your time.


Best Regards,

Andrew Gozillon




_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev




--

Mikhail Ramalho.

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev