[cfe-dev] Did clang storage the Abstract Syntax Tree after parsing the source file?

BugShan BugShan at live.cn
Thu Jun 12 06:51:28 PDT 2014


Hello all,
      I am working on a project(AutoCompletion for SublimeText Editor) 
by using Clang but not libclang.Iwant to have a full access to AST.So 
these days, I download and read the clang's source Code(i am new to 
develop the clang tools), and find that every time to call 
CodeCompete(at ASTUnit.cpp), clang will parse the source file again(at 
ParseAST func). I dont know why but I think it won't be slow?In my mind, 
it would restore all the information into the Abstract Syntax Tree after 
parsing the specified source file,and get the result ASTNode by 
condition from calling CodeComplete function. I think if there is some 
reasons, i am wrong, or I skip the important part in clang source code.
     If anybody understand what i mean and know something, please give 
me some ideas.
THX!
Reguard!



More information about the cfe-dev mailing list