[cfe-dev] Generation of CallExpr to builtin function

Abramo Bagnara abramobagnara at tin.it
Mon Oct 5 07:54:08 PDT 2009


In our application we need to generate a new CallExpr to a builtin
function, but we are unable to find a way to do that.

In SemaDecl.cpp we have found

/// LazilyCreateBuiltin - The specified Builtin-ID was first used at
/// file scope.  lazily create a decl for it. ForRedeclaration is true
/// if we're creating this built-in in anticipation of redeclaring the
/// built-in.
NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned bid,
                                     Scope *S, bool ForRedeclaration,
                                     SourceLocation Loc);

but it's inaccessible (and does also other things).

What's the right way to do that?




More information about the cfe-dev mailing list