Replies: 2 comments
-
Hi @ta-chen! I think this is an interesting question, but it's not specific to clangd. May I suggest asking it in the Clang Frontend Discourse Forum instead? It will have a wider audience there. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Sorry, moving to Clang Frontend Discourse Forum. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a question regarding the source range of a FunctionDecl.
I am writing a matcher to match function declarations and use the FunctionDecl class' getSourceRange() method to get the filename, the begin and the end locations of the declarations. For the most part, it works fine. But when a function with a #defined return type in a system header, then getSourceRange() does not give the expected filename and begin source location. For example, func_A below has this issue, but not func_B.
I have also checked with ast-dump and confirmed this is the case in clang 14, 16 and 17.
Is this what it is supposed to be, or is there an issue here? Thanks.
Beta Was this translation helpful? Give feedback.
All reactions