================
@@ -299,6 +299,25 @@ bool RetainTypeChecker::isUnretained(const QualType QT,
bool ignoreARC) {
return RecordlessTypes.contains(QT.getTypePtr());
}
+const TypedefDecl *RetainTypeChecker::getCanonicalDecl(QualType QT) {
+ if (auto *TT = dyn_cast_or_null<TypedefType>(QT.getTypePtrOrNull())) {
+ if (auto *TD = dyn_cast<TypedefDecl>(TT->getDecl()))
+ return TD;
+ }
+ QT = QT.getCanonicalType();
----------------
steakhal wrote:
Shouldn't we move this to the very top of this function?
I think that would be a more natural place for canonicalization.
https://github.com/llvm/llvm-project/pull/202724
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits