Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
sesiuni:compiler:ast [2014/07/13 22:10]
freescale [The Clang AST]
sesiuni:compiler:ast [2014/07/13 22:10] (current)
freescale [The Clang AST]
Line 13: Line 13:
 An interesting thing to note about the implementation of **RecursiveASTVisitor** is that it uses the **CRTP** (Curiously Recurring Template Pattern) idiom in order to achieve static polymorphism. An interesting thing to note about the implementation of **RecursiveASTVisitor** is that it uses the **CRTP** (Curiously Recurring Template Pattern) idiom in order to achieve static polymorphism.
  
-We will subclass **RecursiveASTVisitor** and invoke its **TraverseTranslationUnitDecl** from the **HandleTranslationUnitDecl** method of our **ASTConsumer**. This will make the visitor traverse the entire declaration (including, for function definitions,​ the body of the function), invoking **Visit*** methods on every node. We will write the largest part of our tools in these **Visit* ** methods.+We will subclass **RecursiveASTVisitor** and invoke its **TraverseTranslationUnitDecl** from the **HandleTranslationUnitDecl** method of our **ASTConsumer**. This will make the visitor traverse the entire declaration (including, for function definitions,​ the body of the function), invoking **Visit* ** methods on every node. We will write the largest part of our tools in these **Visit* ** methods.
  
 You can get a good understanding of the **RecursiveASTVisitor** by reading the comments in its header file (//​clang/​AST/​RecursiveASTVisitor.h//​). You can get a good understanding of the **RecursiveASTVisitor** by reading the comments in its header file (//​clang/​AST/​RecursiveASTVisitor.h//​).
sesiuni/compiler/ast.1405278626.txt.gz · Last modified: 2014/07/13 22:10 by freescale