[PATCH] Add support for type traversal matchers.

Manuel Klimek klimek at google.com
Fri Jul 12 11:22:02 PDT 2013



================
Comment at: docs/tools/dump_ast_matchers.py:171
@@ +170,3 @@
+      comment_result_types = extract_result_types(comment)
+      if comment_result_types and \
+          sorted(result_types) != sorted(comment_result_types):
----------------
Usual python idiom is to use () instead of \ as far as I understand...

================
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:1415
@@ +1414,3 @@
+          typename ReturnTypesF = void(AllNodeBaseTypes)>
+class TypeTraversePolymorphicMatcher {
+private:
----------------
The new classes here are not self-explanatory to me :) Please add comments explaining what they're useful for ...

================
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:1422
@@ +1421,3 @@
+
+public:
+  typedef typename ExtractFunctionArgMeta<ReturnTypesF>::type ReturnTypes;
----------------
I generally prefer public methods first. In general, I like having methods sorted from "most important for the user of the class" (right at the top) to "most implementation detail" (at the bottom).


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



More information about the cfe-commits mailing list