[cfe-dev] how to know if a function name is used to call or only a reference ?

kevinlynx kevinlynx at gmail.com
Sat Jan 5 00:26:12 PST 2013


say I have the codes below:

    void func() {}
    void test() {
        func();  // function call
        if (func) {  // only reference the function 
        }
    }

when I get a DeclRefExpr from RecursiveASTVisitor::VisitDeclRefExpr, and I know `func` is a function type, But how can i know it's used as a normal function call, or a reference only ? 

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130105/aba58b84/attachment.html>


More information about the cfe-dev mailing list