[cfe-dev] How to check if a Decl is static

Vassil Vassilev vasil.georgiev.vasilev at cern.ch
Sat Mar 12 01:34:51 PST 2011


On 12.3.2011 ?. 10:49, Ilya Mirsky wrote:
> Hi all,
>
> I need to check if a given Decl, and more specifically a FunctionDecl, 
> is declared static.
> Currently I'm manually looking for the static token using 
> SourceManager::getCharcterData.
> Is there more elegant way?
Only members can be static, right?
I believe what you are looking for is clang::CXXMethodDecl::isStatic(), 
defined in clang/AST/DeclCXX.h (There was a thread recently: "Online 
Doxygen docs are incomplete")

Vassil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110312/96a30919/attachment.html>


More information about the cfe-dev mailing list