EndRangeLoc should always be set to at least the ending paren or brace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136573
91177308-0d34-0410-b5e6-
96231b3b80d8
void *Mem = C.Allocate(sizeof(ParmVarDecl*)*NumParams);
ParamInfo = new (Mem) ParmVarDecl*[NumParams];
memcpy(ParamInfo, NewParamInfo, sizeof(ParmVarDecl*)*NumParams);
-
- // Update source range. The check below allows us to set EndRangeLoc before
- // setting the parameters.
- if (EndRangeLoc.isInvalid() || EndRangeLoc == getLocation())
- EndRangeLoc = NewParamInfo[NumParams-1]->getLocEnd();
}
}