[PATCH] Enhancements for the DynTypedNode

Doug Gregor dgregor at apple.com
Wed Jun 19 10:24:41 PDT 2013


  The general flow of this looks fine, but I find the name DynNodeType to be misleading. The "Dyn" is for dynamic, but it's not clear what the static counterpart would mean. More importantly, we tend to use the word "type" to refer to types in the source program. That's not at all what this is modeling: this is modeling the types of Clang's various AST nodes (for types, statements, declarations, etc.). We use the terms "kind" or "class" to talk about these in the actual AST, so I think this class should be called ASTNodeClass or ASTNodeKind and s/type/class/g or s/type/kind/g throughout the class to match that terminology.


================
Comment at: include/clang/AST/ASTTypeTraits.h:52
@@ +51,3 @@
+
+  /// \brief A string representation of the type.
+  StringRef asStringRef() const;
----------------
"String representation of the kind", perhaps?


http://llvm-reviews.chandlerc.com/D829

BRANCH
  ast_type_check

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list