I am not opposed to making the compiler faster, but I am not in a position to 
do that.

================
Comment at: lib/ASTMatchers/ASTMatchersInternal.cpp:29-37
@@ -28,1 +28,11 @@
 
+bool DynTypedMatcher::canConvertTo(ast_type_traits::ASTNodeKind To) const {
+  const auto SourceKind = getSupportedKind();
+  auto QualKind = ast_type_traits::ASTNodeKind::getFromNodeKind<QualType>();
+  auto TypeKind = ast_type_traits::ASTNodeKind::getFromNodeKind<Type>();
+  if (To.isSame(QualKind)) {
+    return SourceKind.isSame(TypeKind) || SourceKind.isSame(QualKind);
+  }
+  return SourceKind.isBaseOf(To);
+}
+
----------------
klimek wrote:
> This needs a comment or two :)
Done.

http://reviews.llvm.org/D5124



_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to