[PATCH] D26435: Use unique_ptr for cached tokens for default arguments in C++.
Malcolm Parsons via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 9 02:05:15 PST 2016
malcolm.parsons added inline comments.
================
Comment at: include/clang/Sema/DeclSpec.h:1314
for (unsigned I = 0; I < NumParams; ++I) {
- delete Params[I].DefaultArgTokens;
- Params[I].DefaultArgTokens = nullptr;
+ Params[I].DefaultArgTokens.release();
}
----------------
Did you mean `reset()`?
================
Comment at: lib/Parse/ParseDecl.cpp:6064
if (!ConsumeAndStoreInitializer(*DefArgToks, CIK_DefaultArgument)) {
- delete DefArgToks;
- DefArgToks = nullptr;
+ DefArgToks.release();
Actions.ActOnParamDefaultArgumentError(Param, EqualLoc);
----------------
Did you mean `reset()`?
https://reviews.llvm.org/D26435
More information about the cfe-commits
mailing list