[cfe-dev] Making Sema public

Lukasz Janyst ljanyst at cern.ch
Thu Dec 11 06:50:31 PST 2008


On Thu, Dec 11, 2008 at 7:27 AM, Chris Lattner <clattner at apple.com> wrote:
> I'd prefer not to, but could be convinced.  What sorts of crazy things do
> you want to do?

   I have a set of function declarations given as a vector of
FunctionDecl objects. The set is dynamic, I mean its contents depend
on the previous activity of the user. The code being parsed may call
any of these functions. I need to make the parser to insert correct
DeclRefExpr nodes when it encouters a function call so that I could
later codegen the AST and link the resulting module to another module
actually holding the definitions of these functions.

   For example the following code is to be parsed:

#include <stdio.h>

int main( int argc, char** argv ) {
  printf( "The result: %s\n", doSomething( argv[0] ) );
  return 0;
}

  And I have: "char* doSomething( const char* input );" given as a FunctionDecl.

   Lukasz



More information about the cfe-dev mailing list