Anastasia marked 3 inline comments as done. Anastasia added inline comments.
================ Comment at: lib/Parse/ParseDecl.cpp:6129 + // create DeclSpec here to be populated later. + DS = new DeclSpec(AttrFactory); + ---------------- rjmccall wrote: > Is it possible to just build into a local DS and then move that DS to the > heap if it contains qualifiers or attributes? It'd be nice to not do a heap > allocation every time we parse a function declarator in C++ since the vast > majority of them don't have qualifiers. (It probably has to be a move to > handle attributes and `AttributeFactory` correctly.) > > That would also side-step any concerns about memory management. I found `DeclSpec` a bit copy-unfriednly... not sure it was better to modify its interface. For now I just provide custom impl for function quals. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55948/new/ https://reviews.llvm.org/D55948 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits