[cfe-dev] Libclang get storage class

Guilherme guibufolo at gmail.com
Mon Sep 8 05:40:46 PDT 2014


Hello,

I'm trying to find out if a function/variable declaration in C was
done using static as storage class or not.

I'm trying to retrieve the storage class using libclang and it's
python bindings.

After checking the documentatation for libclang under
https://github.com/llvm-mirror/clang/blob/master/tools/libclang/libclang.exports
for storage class exports i could not find anything.

Is it really the case that no storage class access functions are
exported in libclang or did i just oversee it?

Is this the right way to retrieve if a function/variable was declared
static by looking at FunctionDecl::getStorageClass() and
VarDecl::getStorageClass()? Or is it also retrievable somewhere else
in libClang?

Thank you for your help.
Gui



More information about the cfe-dev mailing list