LGTM.

================
Comment at: include/clang/ASTMatchers/ASTTypeTraits.h:86
@@ -71,1 +85,3 @@
+  /// pointers and thus need to be stored by value.
+  llvm::AlignedCharArrayUnion<Decl*, Stmt*, QualType> Storage;
 };
----------------
Daniel Jasper wrote:
> Michael Diamond wrote:
> > I think it would be better to use boost::any here. Then you don't have to 
> > explicitly specify all the types. You will still be able to store the 
> > QualType by value, but you won't have to worry about it in the declaration 
> > of Storage.
> LLVM and Boost don't mix ;-).... Boost is quite massive and would create a 
> significant burden on clang. The specialized abstractions provided by LLVM 
> are quite sufficient for most use cases.
> 
> The best data structure would probably by a union, however until we can use 
> C++11, unions don't support members with non-trivial constructors. That is 
> why we use this helper structure for the time being.
Hrmm... I talked briefly with Manuel about adding the Any abstraction to 
llvm/Support and I tried to broach the idea on the IRC channel but didn't get 
any response. I think that's the way to go in the future, but in the short 
term, I don't think it should hold up this CL.


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

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

Reply via email to