[cfe-dev] how to know if a function name is used to call or only a reference ?
Chandler Carruth
chandlerc at google.com
Sat Jan 5 00:49:39 PST 2013
Look at the outer expression? You should see the DeclRefExpr inside of a
CallExpr or one of the other call AST nodes for actual calls.
On Sat, Jan 5, 2013 at 12:26 AM, kevinlynx <kevinlynx at gmail.com> wrote:
> 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.
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130105/9c7b5bf3/attachment.html>
More information about the cfe-dev
mailing list