Anastasia added inline comments.

================
Comment at: include/clang/AST/Type.h:5019
@@ +5018,3 @@
+///
+class PipeType : public Type, public llvm::FoldingSetNode {
+  QualType ElementType;
----------------
Not related to this change though, but I was just thinking that it might be 
possible to avoid a lot of code repetition by moving common functionality of 
most special type classes into a base class. For example, AtomicType, 
BlockPointerType, ComplexType, PointerType, PipeType  all share similar 
functionality being some sort of a wrapper/container of another type. 

It will also avoid a lot of code replication in ASTContext (for example 
get{Atomic|BlockPointer|Pointer|Complex|Pipe}Type methods) as we could have 
some common factory pattern like template method for creating these types and 
filling the type caches. It seems they are mostly done in similar way.

Would be a nice refactoring task I think.


http://reviews.llvm.org/D14441



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to