================
@@ -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();
+ auto PointeeQT = QT.getCanonicalType()->getPointeeType();
----------------
steakhal wrote:
You have just canonicalized this one line above. I think this
`QT.getCanonicalType()` is definitely a noop.
https://github.com/llvm/llvm-project/pull/202724
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits