]> granicus.if.org Git - clang/commitdiff
Update internals manual on how to add AST nodes.
authorNico Weber <nicolasweber@gmx.de>
Mon, 7 Jul 2014 00:50:39 +0000 (00:50 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 7 Jul 2014 00:50:39 +0000 (00:50 +0000)
StmtDumper.cpp is called ASTDumper.cpp these days, and usually works well
for new AST nodes without changes.  There's now DataRecursiveASTVisitor
in addition to RecursiveASTVisitor, and serialization wasn't mentioned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212426 91177308-0d34-0410-b5e6-96231b3b80d8

docs/InternalsManual.rst

index 5830a7e506080f5e45125e067be4bcdd2de2db16..8e047dbdae7add5968f6f03eeb7d7d0449857842 100644 (file)
@@ -1852,13 +1852,14 @@ are similar.
    * Make sure that ``children()`` visits all of the subexpressions.  This is
      important for a number of features (e.g., IDE support, C++ variadic
      templates).  If you have sub-types, you'll also need to visit those
-     sub-types in the ``RecursiveASTVisitor``.
-   * Add printing support (``StmtPrinter.cpp``) and dumping support
-     (``StmtDumper.cpp``) for your expression.
+     sub-types in ``RecursiveASTVisitor`` and ``DataRecursiveASTVisitor``.
+   * Add printing support (``StmtPrinter.cpp``) for your expression.
    * Add profiling support (``StmtProfile.cpp``) for your AST node, noting the
      distinguishing (non-source location) characteristics of an instance of
      your expression.  Omitting this step will lead to hard-to-diagnose
      failures regarding matching of template declarations.
+   * Add serialization support (``ASTReaderStmt.cpp``, ``ASTWriterStmt.cpp``)
+     for your AST node.
 
 #. Teach semantic analysis to build your AST node.  At this point, you can wire
    up your ``Sema::BuildXXX`` function to actually create your AST.  A few