[PATCH] D20428: Tracking exception specification source locations

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 10 08:28:12 PDT 2016


aaron.ballman added a comment.

In http://reviews.llvm.org/D20428#452680, @hintonda wrote:

> The comment says to rebuild TypeSourceInfo, but isn't that what this does?
>
>   if (TSInfo->getType() != FD->getType())
>     Updated = getFunctionTypeWithExceptionSpec(*this, TSInfo->getType(), ESI);
>   TSInfo->overrideType(Updated);
>   


That is only overriding the `QualType` stored in the `TypeSourceInfo`, but it does not rebuild the type source information as a whole (which includes the `FunctionTypeLoc`). The problem is that we need a new TSI that has sufficient space to store the exception specification source range in the case the existing source info does not have it. What's more, this function doesn't currently have that information (I believe it needs to be passed in as a parameter) to store in the adjusted type info.


http://reviews.llvm.org/D20428





More information about the cfe-commits mailing list