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

Ilya Mirsky ilya.mirsky at gmail.com
Sat Mar 12 02:54:04 PST 2011


Thank you, but I'm working on C files, not C++.
Is there similar isStatic method in C context?


Thanks in advance,
Ilya



On Sat, Mar 12, 2011 at 11:34 AM, Vassil Vassilev <
vasil.georgiev.vasilev at cern.ch> wrote:

>  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
>



-- 
Ilya Mirsky
www.cs.bgu.ac.il/~mirskyil <http://www.cs.bgu.ac.il/%7Emirskyil>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110312/6c971c6e/attachment.html>


More information about the cfe-dev mailing list