[PATCH] D62064: [ASTImporter] Fix unhandled cases in ASTImporterLookupTable
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 11 06:25:38 PDT 2019
martong marked 3 inline comments as done.
martong added inline comments.
================
Comment at: clang/unittests/AST/ASTImporterTest.cpp:4259
static const RecordDecl * getRecordDeclOfFriend(FriendDecl *FD) {
QualType Ty = FD->getFriendType()->getType();
+ if (auto *Inner = dyn_cast<TypedefType>(Ty.getTypePtr())) {
----------------
a_sidorin wrote:
> martong wrote:
> > a_sidorin wrote:
> > > Will getCanonicalType() do the job?
> > That's a good catch! Thank you for pointing out.
> Can we replace the whole function with:
> ```
> QualType Ty = FD->getFriendType()->getType().getCanonicalType();
> return cast<RecordType>(Ty)->getDecl();
> ```
> ?
Thank you, this is indeed simpler, changed that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62064/new/
https://reviews.llvm.org/D62064
More information about the cfe-commits
mailing list