Fixes PR19689, and possibly the last leak in clang (PR19521). PR19689 contains
a few suggestions on how to make the default argument token code a bit more
solid, these changes can possibly be landed in follow-ups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208481
91177308-0d34-0410-b5e6-
96231b3b80d8
///
/// This is used in various places for error recovery.
void freeParams() {
+ if (Params) {
+ delete Params->DefaultArgTokens;
+ Params->DefaultArgTokens = nullptr;
+ }
if (DeleteParams) {
delete[] Params;
DeleteParams = false;