hans added a comment. Some of these are great improvements, especially using auto for iterators etc.
But I'm not sure we'll want to start changing "Foo *foo = new Foo;" to use auto everywhere. I expect we'd have to do that in a huge number of places? ================ Comment at: include/clang/AST/ASTVector.h:385 @@ -383,3 +384,3 @@ // Allocate the memory from the ASTContext. - T *NewElts = new (C, llvm::alignOf<T>()) T[NewCapacity]; + auto *NewElts = new (C, llvm::alignOf<T>()) T[NewCapacity]; ---------------- I'm not sure this one is an improvement. ================ Comment at: include/clang/AST/DeclContextInternals.h:90 @@ -88,3 +89,3 @@ else { - DeclsTy *VT = new DeclsTy(); + auto *VT = new DeclsTy(); if (NamedDecl *OldD = getAsDecl()) ---------------- Same here. ================ Comment at: include/clang/AST/DeclTemplate.h:1726 @@ -1725,4 +1725,3 @@ "Already set to a class template partial specialization!"); - SpecializedPartialSpecialization *PS - = new (getASTContext()) SpecializedPartialSpecialization(); + auto *PS = new (getASTContext()) SpecializedPartialSpecialization(); PS->PartialSpecialization = PartialSpec; ---------------- But here it does make it nicer :-) Repository: rL LLVM http://reviews.llvm.org/D13759 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits