courbet added a comment. Thanks for the comments !
================ Comment at: include/clang/AST/Type.h:995 void getAsStringInternal(std::string &Str, - const PrintingPolicy &Policy) const { - return getAsStringInternal(split(), Str, Policy); - } + const PrintingPolicy &Policy) const; ---------------- Quuxplusone wrote: > Nit: could this function have been left in-line, and just changed `split()` > to `splitAccordingToPolicy(this, Policy)`? > Even simpler, could `splitAccordingToPolicy` be made a member function of > `QualType`, so that most of these diffs could be simply > `s/split()/splitAccordingToPolicy(Policy)/` without introducing any new > temporary variables or anything? I.e. > ``` > void getAsStringInternal(std::string &Str, > const PrintingPolicy &Policy) const { > return getAsStringInternal(splitAccordingToPolicy(Policy), Str, > Policy); > } > ``` > But if that would make the code harder to read instead of easier, then don't > mind me. I'd rather avoid polluting the `QualType` API with `splitAccordingToPolicy()` which is really only useful for this use case. > without introducing any new temporary variables or anything? i.e. Actually this is independent of the above change, done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55552/new/ https://reviews.llvm.org/D55552 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits