[cfe-dev] HOWTO: access function (template) names from CXCursor

Stefan Seefeld seefeld at sympatico.ca
Sun Jan 23 07:21:05 PST 2011


When parsing a function declaration "void foo(int)" using libclang, how 
can I access the function name "foo" from a cursor ? 
clang_getCursorDisplayName() would return the function name together 
with its signature.

Similarly, when parsing a class or function template, 
clang_getCursorDisplayName() would report the template-id, not the 
(template-)name.

Is that an oversight ?

Thanks,
          Stefan

-- 

       ...ich hab' noch einen Koffer in Berlin...




More information about the cfe-dev mailing list