================
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:450
@@ -436,2 +449,3 @@
   template <typename U> friend class Matcher;
+  friend class DynTypedMatcher;
 
----------------
klimek wrote:
> What is this needed for? I'd prefer if we could get rid of it, but if not, it 
> should have a comment explaining it (so we can take it out if we don't need 
> it any more).
Matcher(DynTypedMatcher) is private because it is essentially "unsafe". You can 
easily create a matcher that matches nothing.
It is only called by explicit conversions like Matcher<T>::dynCastTo<U> and 
DynTypedMatcher::unconditionalConvertTo<T>. The friendship is for those 
functions.

http://reviews.llvm.org/D5675



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

Reply via email to