Parsing a function

Hi:

I am trying to figure out how Clang parse a function and its body. Any
hint about which files/methods, in the Parse/AST directories, to look
into will be a great help.

I believe you should be looking for:

  • void clang::ParseAST(Sema &S, bool PrintStats)…
    – in ParseAST.cpp
  • Parser::DeclGroupPtrTy Parser::ParseExternalDeclaration(CXX0XAttributeList Attr,…
    – in Parser.cpp
    And eventually
  • Decl *Parser::ParseFunctionDefinition(ParsingDeclarator &D,…

or wherever the journey takes you… :slight_smile:

Hope this helps,

– Larisse.