aaron.ballman added a comment. In D111199#3104804 <https://reviews.llvm.org/D111199#3104804>, @yonghong-song wrote:
> @aaron.ballman I checked the source. Looks like we can easily get TypeLoc > from TypeSourceInfo, but not from TypeSourceInfo to TypeLoc. But We need > TypeLoc so we can get attr information and also traverse TypeLoc's.. We might > be able to pass TypeSourceInfo in a few functions e.g., createFieldType(), > but we still need to do TSI->getTypeLoc() and pass TypeLoc to other functions > like getOrCreateType(), createType() etc. So I am inclined to just use > TypeLoc. > > @dblaikie Based on the discussion so far, I suspect we might have to use > TypeLoc. Please let me know what you think. That sounds reasonable to me, but one possibility would be to change `createType()` and `getOrCreateType()` to take a `TypeSourceInfo *` rather than a `QualType` (because you can go from the `TypeSourceInfo *` back to the `QualType` by calling `getType()` on it). However, that could also be a heavier lift due to the number of call sites. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111199/new/ https://reviews.llvm.org/D111199 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits